function commerce_coupon_entity_info_alter in Commerce Coupon 7
Same name and namespace in other branches
- 7.2 commerce_coupon.module \commerce_coupon_entity_info_alter()
Implements hook_entity_info_alter().
Use this hook to specify commerce coupon bundles to avoid a recursion, as loading the commerce coupon types needs the entity info too.
File
- ./
commerce_coupon.module, line 85 - Coupon System for Drupal Commerce.
Code
function commerce_coupon_entity_info_alter(&$entity_info) {
foreach (commerce_coupon_get_types() as $type => $info) {
$entity_info['commerce_coupon']['bundles'][$type]['label'] = $info->label;
}
}