You are here

function uc_recurring_condition_order_contains_renewals in UC Recurring Payments and Subscriptions 7.2

Same name in this branch
  1. 7.2 uc_recurring.ca.inc \uc_recurring_condition_order_contains_renewals()
  2. 7.2 uc_recurring.rules.inc \uc_recurring_condition_order_contains_renewals()
Same name and namespace in other branches
  1. 6.2 uc_recurring.ca.inc \uc_recurring_condition_order_contains_renewals()

Check if the order contains a renewal product.

Parameters

$order: The order object.

$recurring_fee: The recurring fee object.

2 string references to 'uc_recurring_condition_order_contains_renewals'
uc_recurring_ca_condition in ./uc_recurring.ca.inc
Implements hook_ca_condition().
uc_recurring_rules_condition_info in ./uc_recurring.rules.inc
Implements hook_rules_condition_info().

File

./uc_recurring.rules.inc, line 185
Rules definitions.

Code

function uc_recurring_condition_order_contains_renewals($order) {
  foreach ($order->products as $products) {
    if (!empty($products->data['recurring_fee'])) {
      return TRUE;
    }
  }
  return FALSE;
}