You are here

function hook_commerce_cart_order_is_cart in Commerce Core 7

Determines whether or not the given order is a shopping cart order.

When determining if an order should be considered a shopping cart order, the Cart module provides a simple order status comparison but allows other modules to make the decision based on some other criteria. Any module can invalidate the cart status of an order by returning FALSE from this hook, but a module can also opt to treat an order in a non-cart status as a cart by receiving the second argument by reference and setting it to TRUE. It should just be noted that this value could be returned to FALSE by some other module implementing the same hook.

Parameters

$order: The order whose cart status is being determined.

$is_cart: Boolean indicating whether or not the order should be considered a cart order; initialized based on the order status.

Return value

FALSE to indicate that an order should not be treated as a cart.

Deprecated

since 7.x-1.2, use hook_commerce_cart_order_is_cart_alter() instead.

See also

commerce_cart_order_is_cart()

hook_commerce_cart_order_is_cart_alter()

1 invocation of hook_commerce_cart_order_is_cart()
commerce_cart_order_is_cart in modules/cart/commerce_cart.module
Determines whether or not the given order is a shopping cart order.

File

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

Code

function hook_commerce_cart_order_is_cart($order, &$is_cart) {

  // No example.
}