function commerce_checkout_complete_access in Commerce Core 7
Determines if the given order should have access to the checkout completion page based on its order status.
Parameters
$order: The fully loaded order object.
Return value
TRUE or FALSE indicating completion access.
2 calls to commerce_checkout_complete_access()
- commerce_checkout_order_uri in modules/
checkout/ commerce_checkout.module - Returns the current checkout URI for the given order.
- commerce_checkout_page_access in modules/
checkout/ commerce_checkout.module - Checks access to a particular checkout page for a given order.
File
- modules/
checkout/ commerce_checkout.module, line 877 - Enable checkout as a multi-step form with customizable pages and a simple checkout pane API.
Code
function commerce_checkout_complete_access($order) {
// Load the order state array.
$order_status = commerce_order_status_load($order->status);
$order_state = commerce_order_state_load($order_status['state']);
// Check for the checkout_complete property.
return !empty($order_state['checkout_complete']);
}