You are here

function hook_recurring_access in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 uc_recurring.api.php \hook_recurring_access()

Set the access permission on user operations.

Parameters

$fee: The recurring fee object.

$op: The operation being performed, e.g. cancel, edit, update.

$account: The account of the user.

1 function implements hook_recurring_access()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

uc_recurring_hosted_recurring_access in modules/uc_recurring_hosted/uc_recurring_hosted.module
Implements hook_recurring_access().
1 invocation of hook_recurring_access()
uc_recurring_user_access in ./uc_recurring.module
Restrict access to recurring fee operations for users.

File

./uc_recurring.api.php, line 157

Code

function hook_recurring_access($fee, $op, $account) {

  // Deny access to the cancel operation for recurring fees that do not have
  // have an unlimited number of remaining intervals (e.g payment plan)
  if ($op == 'cancel' && $fee->remaining_intervals != UC_RECURRING_UNLIMITED_INTERVALS) {
    return UC_RECURRING_ACCESS_DENY;
  }
  return UC_RECURRING_ACCESS_IGNORE;
}