You are here

function hook_commerce_cart_order_can_refresh in Commerce Core 7

Allow modules to skip/allow the automatic cart refresh when a given cart order is being loaded.

Parameters

$order: The cart order object

Return value

bool Boolean indicating whether or not the cart order can be refreshed.

1 invocation of hook_commerce_cart_order_can_refresh()
commerce_cart_order_can_refresh in modules/cart/commerce_cart.module
Checks if a cart order should be refreshed based on the shopping cart refresh settings on the order settings form.

File

modules/cart/commerce_cart.api.php, line 288
Hooks provided by the Cart module.

Code

function hook_commerce_cart_order_can_refresh($order) {

  // Skip refresh when the current path is "foo".
  if (current_path() === 'foo') {
    return FALSE;
  }
}