You are here

function hook_uc_coupon_delete in Ubercart Discount Coupons 7.2

Same name and namespace in other branches
  1. 6 uc_coupon.api.php \hook_uc_coupon_delete()

hook_uc_coupon_delete().

Invoked just before a coupon is going to be deleted. Allows modules to clean up any additinal coupon data in their tables.

Parameters

$coupon: The coupon object which is about to be deleted.

1 function implements hook_uc_coupon_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

uc_coupon_purchase_uc_coupon_delete in uc_coupon_purchase/uc_coupon_purchase.module
Implements hook_uc_coupon_delete().
1 invocation of hook_uc_coupon_delete()
uc_coupon_delete in ./uc_coupon.entity.inc

File

./uc_coupon.api.php, line 50
Ubercart Discount Coupon module api/hooks. Version 7.x-2.x

Code

function hook_uc_coupon_delete($coupon) {

  // Delete extra usage information
  db_delete('extra_coupon_usage')
    ->condition('cid', $coupon->cid)
    ->execute();
}