You are here

function commerce_cart_order_session_order_ids in Commerce Core 7

Returns an array of cart order IDs stored in the session.

Parameters

$completed: Boolean indicating whether or not the operation should retrieve the completed orders array instead of the active cart orders array.

Return value

An array of applicable cart order IDs or an empty array if none exist.

2 calls to commerce_cart_order_session_order_ids()
commerce_cart_commerce_entity_access_condition_commerce_order_alter in modules/cart/commerce_cart.module
Implements hook_commerce_entity_access_condition_commerce_order_alter().
commerce_checkout_access in modules/checkout/commerce_checkout.module
Checks the current user's access to the specified checkout page and order.

File

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

Code

function commerce_cart_order_session_order_ids($completed = FALSE) {
  if ($cart_provider = commerce_cart_get_provider()) {
    return $cart_provider
      ->cartOrderIds($completed);
  }
}