You are here

function uc_recurring_renewal_module_invoke in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 uc_recurring.module \uc_recurring_renewal_module_invoke()

Invokes uc_recurring renewal hooks in every module.

We cannot use module_invoke() for this, because the arguments need to be passed by reference.

Parameters

$type: The renewal hook type. Available type recurring_renewal_pending, recurring_renewal_completed, recurring_renewal_failed.

$order: The order object.

$fee: The recurring Fee object.

2 calls to uc_recurring_renewal_module_invoke()
uc_recurring_create_renewal_order in ./uc_recurring.module
Create a new order to be renewed via a recurring profile.
uc_recurring_renew in ./uc_recurring.module
Process a renewal, either from the cron job or manually from a fee handler.

File

./uc_recurring.module, line 1248
Allows you to add a recurring fee to a product/SKU to handle subscription type services.

Code

function uc_recurring_renewal_module_invoke($type, &$order, &$fee) {
  foreach (module_list() as $module) {
    $function = $module . '_' . $type;
    if (function_exists($function)) {
      $function($order, $fee);
    }
  }
}