function commerce_checkout_commerce_order_state_info_alter in Commerce Core 7
Implements hook_commerce_order_state_info_alter().
Adds the checkout_complete property to order state info arrays to determine access to the completion page for orders in the given state. By default, neither orders in the canceled or cart states can view the completion page.
File
- modules/
checkout/ commerce_checkout.module, line 893 - Enable checkout as a multi-step form with customizable pages and a simple checkout pane API.
Code
function commerce_checkout_commerce_order_state_info_alter(&$order_states) {
foreach ($order_states as $name => &$order_state) {
if (in_array($name, array(
'canceled',
'cart',
))) {
$order_state['checkout_complete'] = FALSE;
}
else {
$order_state['checkout_complete'] = TRUE;
}
}
}