function commerce_stock_rules_condition_info in Commerce Stock 7
Same name and namespace in other branches
- 7.2 commerce_stock.rules.inc \commerce_stock_rules_condition_info()
Implements hook_rules_condition_info().
File
- ./
commerce_stock.rules.inc, line 180 - Rules integration for Commerce Stock.
Code
function commerce_stock_rules_condition_info() {
$conditions = array();
$conditions['commerce_stock_order_has_out_of_stock'] = array(
'label' => t('Order has products that are out of stock'),
'parameter' => array(
'order' => array(
'type' => 'commerce_order',
'label' => t('Order'),
),
),
'group' => t('Commerce Stock'),
'callbacks' => array(
'execute' => 'commerce_stock_rules_order_has_out_of_stock',
),
);
$conditions['commerce_stock_stock_enabled_on_line_item'] = array(
'label' => t('Line item has a product of product type that has stock management enabled'),
'parameter' => array(
'commerce_product' => array(
'type' => 'commerce_product',
'label' => t('product'),
),
),
'group' => t('Commerce Stock'),
'callbacks' => array(
'execute' => 'commerce_stock_line_item_product_enabled',
),
);
return $conditions;
}