function commerce_coupon_entity_property_info_alter in Commerce Coupon 7
Same name and namespace in other branches
- 7.2 commerce_coupon.info.inc \commerce_coupon_entity_property_info_alter()
Implements hook_entity_property_info_alter() on top of the Product module.
File
- ./
commerce_coupon.info.inc, line 99 - Provides metadata for the coupon entity.
Code
function commerce_coupon_entity_property_info_alter(&$info) {
if (!empty($info['commerce_coupon']['bundles'])) {
$properties = array();
foreach ($info['commerce_coupon']['bundles'] as $bundle => $bundle_info) {
$bundle_info += array(
'properties' => array(),
);
$properties += $bundle_info['properties'];
}
$info['commerce_coupon']['properties']['commerce_coupon_code'] = $properties['commerce_coupon_code'];
$info['commerce_coupon']['properties']['commerce_coupon_number_of_uses'] = $properties['commerce_coupon_number_of_uses'];
}
}