function commerce_promotion_commerce_condition_info_alter in Commerce Core 8.2
Implements hook_commerce_condition_info_alter().
File
- modules/
promotion/ commerce_promotion.module, line 18 - Provides a UI for managing promotions.
Code
function commerce_promotion_commerce_condition_info_alter(&$definitions) {
foreach ($definitions as &$definition) {
// Force all order item conditions to have the same category.
// This prevents them from accidentally showing in vertical tabs
// in the promotion offer UI.
if ($definition['entity_type'] == 'commerce_order_item') {
$definition['category'] = t('Products');
}
}
}