You are here

function uc_recurring_recurring_fee_ops in Ubercart 5

Implementation of hook_recurring_fee_ops().

File

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

Code

function uc_recurring_recurring_fee_ops($context, $fee) {
  $ops = array();
  switch ($context) {
    case 'fee_admin':
      if ($fee['remaining_intervals'] > 0) {
        $ops[] = l(t('charge'), 'admin/store/orders/recurring/' . $fee['rfid'] . '/charge');
      }
      $ops[] = l(t('edit'), 'admin/store/orders/recurring/' . $fee['rfid'] . '/edit');
      $ops[] = l(t('delete'), 'admin/store/orders/recurring/' . $fee['rfid'] . '/delete');
      break;
    case 'user':
      $ops[] = l(t('cancel'), 'user/' . $fee['uid'] . '/recurring/' . $fee['rfid'] . '/cancel');
  }
  return $ops;
}