You are here

function commerce_product_valid_pre_calculation_product in Commerce Core 7

Determines if a given product should be considered for price pre-calculation.

Parameters

$product: The product being considered for sell price pre-calculation.

Return value

TRUE or FALSE indicating whether or not the product is valid.

1 call to commerce_product_valid_pre_calculation_product()
commerce_product_pre_calculate_sell_prices in modules/product_pricing/commerce_product_pricing.module
Pre-calculates sell prices for qualifying products based on valid rule configurations on the "Calculating product sell price" event.

File

modules/product_pricing/commerce_product_pricing.module, line 402
Enables Rules based product sell price calculation for dynamic product pricing.

Code

function commerce_product_valid_pre_calculation_product($product) {

  // Allow other modules to invalidate this product.
  if (in_array(FALSE, module_invoke_all('commerce_product_valid_pre_calculation_product', $product))) {
    return FALSE;
  }
  return TRUE;
}