function hook_uc_coupon_alter in Ubercart Discount Coupons 7.2
Same name and namespace in other branches
- 6 uc_coupon.api.php \hook_uc_coupon_alter()
Allow modules to alter a coupon after it is loaded.
Parameters
$coupon: The coupon object that was just laoded.
1 invocation of hook_uc_coupon_alter()
- uc_coupon_load in ./
uc_coupon.entity.inc - Load a coupon object.
File
- ./
uc_coupon.api.php, line 65 - Ubercart Discount Coupon module api/hooks. Version 7.x-2.x
Code
function hook_uc_coupon_alter(&$coupon) {
// Allow certain users to get double the discount.
if (user_access('get double discount')) {
$coupon->value *= 2;
}
}