function uc_recurring_get_fees_for_renew in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 7.2 uc_recurring.module \uc_recurring_get_fees_for_renew()
 
Get all pending fees that should be renewed.
1 call to uc_recurring_get_fees_for_renew()
- uc_recurring_cron in ./
uc_recurring.module  - Implementation of hook_cron().
 
File
- ./
uc_recurring.module, line 894  - Allows you to add a recurring fee to a product/SKU to handle subscription type services.
 
Code
function uc_recurring_get_fees_for_renew() {
  $fees = array();
  $result = db_query("SELECT * FROM {uc_recurring_users} WHERE remaining_intervals <> 0 AND next_charge <= %d AND status = %d AND own_handler = 0 ORDER BY order_id DESC", time(), UC_RECURRING_FEE_STATUS_ACTIVE);
  while ($fee = db_fetch_object($result)) {
    $fee->data = unserialize($fee->data);
    $fees[$fee->rfid] = $fee;
  }
  return $fees;
}