You are here

function commerce_coupon_load in Commerce Coupon 7

Same name and namespace in other branches
  1. 7.2 commerce_coupon.module \commerce_coupon_load()

Fetch a coupon object.

Parameters

$commerce_coupon_id: Integer specifying the coupon id.

bool $reset: A boolean indicating that the internal cache should be reset.

Return value

mixed A fully-loaded $commerce_coupon object or FALSE if it cannot be loaded.@see commerce_coupon_load_multiple()

1 call to commerce_coupon_load()
commerce_coupon_load_by_code in ./commerce_coupon.module
Loads a coupon by its coupon code.

File

./commerce_coupon.module, line 572
Coupon System for Drupal Commerce.

Code

function commerce_coupon_load($commerce_coupon_id, $reset = FALSE) {
  $commerce_coupons = commerce_coupon_load_multiple(array(
    $commerce_coupon_id,
  ), array(), $reset);
  return reset($commerce_coupons);
}