function hook_uc_order_state in Ubercart 7.3
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".
2 functions implement hook_uc_order_state()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- uc_order_uc_order_state in uc_order/
uc_order.module - Implements hook_uc_order_state().
- uc_payment_uc_order_state in payment/
uc_payment/ uc_payment.module - Implements hook_uc_order_state().
1 invocation of hook_uc_order_state()
- uc_order_state_list in uc_order/
uc_order.module - Returns a sorted list of the order states defined in the various modules.
File
- uc_order/
uc_order.api.php, line 534 - Hooks provided by the Order module.
Code
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;
}