I am working in a module and I have added custom date data attribute to ubercart order.

Now, I would like to create a data selector in rules for custom date attribute of the order.

I have implemented hook_rules_data_info() into my custom module but its not showing in data selector in rules.

 * Implements hook_rules_data_info().
function uc_datepicker_rules_data_info() {

  $entities['uc_datepicker'] = array(
    'label' => t('Ubercart Delivery Date'),
    'group' => t('Ubercart'),
    'wrap' => TRUE,
    'token type' => FALSE,

  return $entities;

I have also added implemented hook_rules_condition_info() hook and its showing date condition into rules correctly.

Please suggest, how can I add data selector in rules for date attribute of the order in my custom module.


1 Answer 1


Have you tried with the options as 'getter callback' & 'setter callback'? It seems that these data selectors that you are creating needs to pass the values to the already implemented hook_rules_condition_info as parameters.

  • I have not tried with getter callback & setter callback. I will try. Jul 5, 2014 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.