You are here

function uc_recurring_condition_order_contains_renewals in UC Recurring Payments and Subscriptions 6.2

Same name and namespace in other branches
  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()

Check if the order contains a renewal product.

Parameters

$order: The order object.

$recurring_fee: The recurring fee object.

$settings: The order settings.

1 string reference to 'uc_recurring_condition_order_contains_renewals'
uc_recurring_ca_condition in ./uc_recurring.ca.inc
Implementation of hook_ca_condition().

File

./uc_recurring.ca.inc, line 324
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_condition_order_contains_renewals($order, $settings) {
  foreach ($order->products as $products) {
    if (!empty($products->data['recurring_fee'])) {
      return TRUE;
    }
  }
  return FALSE;
}