Quantcast
Channel: BAXWRDS - Planet Drupal
Viewing all articles
Browse latest Browse all 10

Drupal 7 Ubercart Recurring Payment Cancellation Rule

0
0

For a current Drupal 7 project that uses Ubercart and Ubercart Recurring to provide for a subscription service, I need the ability for an admin user to be able to cancel a user's ongoing recurring fee when a subscription level is changed. I accomplished this with the following php rule:

<?php
// load all recurring fees for a user
$recurring_fees = uc_recurring_get_user_fees($user_uid);
// loop through fees
foreach ($recurring_fees AS $fee) {
// cancel each fee
uc_recurring_fee_cancel($fee->rfid);
}
?>

read more


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images