You are here

function uc_recurring_ca_condition in UC Recurring Payments and Subscriptions 6.2

Same name and namespace in other branches
  1. 7.2 uc_recurring.ca.inc \uc_recurring_ca_condition()

Implementation of hook_ca_condition().

File

./uc_recurring.ca.inc, line 215
This file contains the Conditional Actions hooks and functions necessary to make the recurring-related entity, conditions, events, and actions work.

Code

function uc_recurring_ca_condition() {
  $conditions['uc_recurring_renewal_status_condition'] = array(
    '#title' => t('Check if the order is a renewal'),
    '#description' => t('Returns TRUE if the current order is a renewal.'),
    '#category' => t('Order: Recurring'),
    '#callback' => 'uc_recurring_condition_order_contains_renewals',
    '#arguments' => array(
      'order' => array(
        '#entity' => 'uc_order',
        '#title' => t('Order'),
      ),
    ),
  );
  $conditions['uc_recurring_renewal_expired_condition'] = array(
    '#title' => t('Check if the recurring fee has expired'),
    '#description' => t('Returns TRUE if the current recurring fee has expired.'),
    '#category' => t('Order: Recurring'),
    '#callback' => 'uc_recurring_condition_order_has_expired',
    '#arguments' => array(
      'recurring_fee' => array(
        '#entity' => 'uc_recurring_fee',
        '#title' => t('Recurring Fee'),
      ),
    ),
  );
  return $conditions;
}