Skip navigation


7 uc_order.api.php hook_uc_order_state()

Registers static order states.

Order states are module-defined categories for order statuses. Each state will have a default status that is used when modules need to move orders to new state, but don't know which status to use.

Return value

An array of order state definitions. Each definition is an array keyed by the machine name of the state, with the following members:

  • title: The human-readable, translated name.
  • weight: The list position of the state.
  • scope: Either "specific" or "general".

Related topics

2 functions implement hook_uc_order_state()

1 invocation of hook_uc_order_state()


ubercart/uc_order/uc_order.api.php, line 534
Hooks provided by the Order module.


function hook_uc_order_state() {
  $states['canceled'] = array(
    'title' => t('Canceled'), 
    'weight' => -20, 
    'scope' => 'specific',
  $states['in_checkout'] = array(
    'title' => t('In checkout'), 
    'weight' => -10, 
    'scope' => 'specific',
  $states['post_checkout'] = array(
    'title' => t('Post checkout'), 
    'weight' => 0, 
    'scope' => 'general',
  $states['completed'] = array(
    'title' => t('Completed'), 
    'weight' => 20, 
    'scope' => 'general',

  return $states;