You are here

function hook_uc_coupon_save in Ubercart Discount Coupons 6

Same name and namespace in other branches
  1. 7.2 uc_coupon.api.php \hook_uc_coupon_save()

hook_uc_coupon_save().

Invoked after a coupon is saved to the database.

Parameters

$coupon: The coupon that was just saved.

1 invocation of hook_uc_coupon_save()
uc_coupon_save in ./uc_coupon.module
Save a coupon object.

File

./uc_coupon.api.php, line 34
Ubercart Discount Coupon module api/hooks. Version 6.x-1.x

Code

function hook_uc_coupon_save($coupon) {

  // Alert the user that the coupon needs to be ativated.
  if (!$coupon->status) {
    drupal_set_message(t('The coupon you just saved must be activated before it can be used.'));
  }
}