You are here

function commerce_product_pricing_ui_commerce_product_valid_pre_calculation_rule in Commerce Core 7

Implements hook_commerce_product_valid_pre_calculation_rule().

File

modules/product_pricing/commerce_product_pricing_ui.module, line 109
Exposes a UI for managing product pricing rules and pre-calculation settings.

Code

function commerce_product_pricing_ui_commerce_product_valid_pre_calculation_rule($rule) {

  // If the given rule has been marked to be bypassed, return FALSE.
  $bypass = variable_get('commerce_product_sell_price_pre_calculation_rules_bypass', array());
  if (!empty($bypass[$rule->name]) && $bypass[$rule->name] == $rule->name) {
    return FALSE;
  }
}