function uc_recurring_get_fees_for_expiration 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_expiration()
Get all pending fees that should be expired.
1 call to uc_recurring_get_fees_for_expiration()
- uc_recurring_cron in ./
uc_recurring.module - Implementation of hook_cron().
File
- ./
uc_recurring.module, line 907 - Allows you to add a recurring fee to a product/SKU to handle subscription type services.
Code
function uc_recurring_get_fees_for_expiration() {
$fees = array();
$result = db_query("SELECT * FROM {uc_recurring_users} WHERE remaining_intervals = 0 AND next_charge <= %d AND own_handler = 0 AND status <> %d ORDER BY order_id DESC", time(), UC_RECURRING_FEE_STATUS_EXPIRED);
while ($fee = db_fetch_object($result)) {
$fee->data = unserialize($fee->data);
$fees[$fee->rfid] = $fee;
}
return $fees;
}