You are here

function commerce_cart_order_refresh_form_access in Commerce Core 7

Access callback: determines access to the "Apply pricing rules" local action.

1 string reference to 'commerce_cart_order_refresh_form_access'
commerce_cart_menu in modules/cart/commerce_cart.module
Implements hook_menu().

File

modules/cart/commerce_cart.module, line 105
Implements the shopping cart system and add to cart features.

Code

function commerce_cart_order_refresh_form_access($order) {

  // Do not show the link for cart orders as they're refreshed automatically.
  if (commerce_cart_order_is_cart($order)) {
    return FALSE;
  }

  // Returns TRUE if the link is enabled via the order settings form and the
  // user has access to update the order.
  return variable_get('commerce_order_apply_pricing_rules_link', TRUE) && commerce_order_access('update', $order);
}