You are here

function uc_recurring_ca_trigger in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 uc_recurring.ca.inc \uc_recurring_ca_trigger()

Implements hook_ca_trigger().

File

./uc_recurring.ca.inc, line 271
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_trigger() {
  $order = array(
    '#entity' => 'uc_order',
    '#title' => t('Order'),
  );
  $recurring_fee = array(
    '#entity' => 'uc_recurring_fee',
    '#title' => t('Recurring Fee'),
  );
  $triggers['uc_recurring_renewal_complete'] = array(
    '#title' => t('Recurring order renewal succeeded'),
    '#category' => t('Recurring Fees'),
    '#arguments' => array(
      'order' => $order,
      'recurring_fee' => $recurring_fee,
    ),
  );
  $triggers['uc_recurring_renewal_failed'] = array(
    '#title' => t('Recurring order renewal failed'),
    '#category' => t('Recurring Fees'),
    '#arguments' => array(
      'order' => $order,
      'recurring_fee' => $recurring_fee,
    ),
  );
  $triggers['uc_recurring_cancel'] = array(
    '#title' => t('Recurring order cancelled'),
    '#category' => t('Recurring Fees'),
    '#arguments' => array(
      'order' => $order,
      'recurring_fee' => $recurring_fee,
    ),
  );
  $triggers['uc_recurring_renewal_expired'] = array(
    '#title' => t('Recurring order renewal expired'),
    '#category' => t('Recurring Fees'),
    '#arguments' => array(
      'order' => $order,
      'recurring_fee' => $recurring_fee,
    ),
  );
  return $triggers;
}