You are here

function hook_uc_coupon_save in Ubercart Discount Coupons 7.2

Same name and namespace in other branches
  1. 6 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.entity.inc
Save a coupon object.

File

./uc_coupon.api.php, line 34
Ubercart Discount Coupon module api/hooks. Version 7.x-2.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.'));
  }
}