function commerce_stock_rules_event_info in Commerce Stock 7.2
Implements hook_rules_event_info().
File
- ./
commerce_stock.rules.inc, line 18 - Rules integration for Commerce Stock.
Code
function commerce_stock_rules_event_info() {
$events = array();
$events['commerce_stock_add_to_cart_check_product'] = array(
'label' => t('Check if a product is in stock when adding to cart'),
'group' => t('Commerce Stock'),
'variables' => commerce_stock_rules_event_variables(),
'access callback' => 'commerce_stock_rules_access',
);
$events['commerce_stock_check_add_to_cart_form_state'] = array(
'label' => t('Check if a product add to cart form should be enabled (is in stock)'),
'group' => t('Commerce Stock'),
'variables' => commerce_stock_rules_cart_event_variables(),
'access callback' => 'commerce_stock_rules_access',
);
$events['commerce_stock_check_product_checkout'] = array(
'label' => t('Check if a product is in stock before continuing to checkout'),
'group' => t('Commerce Stock'),
'variables' => commerce_stock_rules_cart_event_variables(),
'access callback' => 'commerce_stock_rules_access',
);
return $events;
}