You are here

function commerce_order_state_load in Commerce Core 7

Returns an order state object.

Parameters

$name: The machine readable name string of the state to return.

Return value

The fully loaded state object or FALSE if not found.

6 calls to commerce_order_state_load()
commerce_checkout_complete_access in modules/checkout/commerce_checkout.module
Determines if the given order should have access to the checkout completion page based on its order status.
commerce_checkout_form_cancel_submit in modules/checkout/includes/commerce_checkout.pages.inc
Special submit handler for the cancel button to avoid processing orders.
commerce_checkout_line_item_views_form_submit in modules/checkout/commerce_checkout.module
Submit handler used to redirect to the checkout page.
commerce_order_handler_field_order_state::render in modules/order/includes/views/handlers/commerce_order_handler_field_order_state.inc
Render the field.
commerce_order_new in modules/order/commerce_order.module
Returns an initialized order object.

... See full list

File

modules/order/commerce_order.module, line 1040
Defines the core Commerce order entity and API functions to manage orders and interact with them.

Code

function commerce_order_state_load($name) {
  $order_states = commerce_order_states();
  if (isset($order_states[$name])) {
    return $order_states[$name];
  }
  return FALSE;
}