You are here

function uc_order_status_data in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.module \uc_order_status_data()
  2. 7.3 uc_order/uc_order.module \uc_order_status_data()

Return a bit of data from a status array based on status ID and array key.

Parameters

$status_id: The ID of the order status you want to get data from.

$key: The key in the status array whose value you want: id, title, state, weight.

Return value

The value of the key you specify.

11 calls to uc_order_status_data()
uc_2checkout_complete in payment/uc_2checkout/uc_2checkout.module
uc_cart_checkout_form in uc_cart/uc_cart.module
uc_cart_checkout_review in uc_cart/uc_cart.module
Allow a customer to review their order before finally submitting it.
uc_cart_complete_sale in uc_cart/uc_cart.module
Completes a sale, including adjusting order status and creating user account.
uc_notify_order in uc_notify/uc_notify.module
Implementation of hook_order().

... See full list

File

uc_order/uc_order.module, line 3135

Code

function uc_order_status_data($status_id, $key) {
  static $statuses;
  if (empty($statuses)) {
    $data = uc_order_status_list();
    foreach ($data as $status) {
      $statuses[$status['id']] = $status;
    }
  }
  return $statuses[$status_id][$key];
}