function commerce_order_load_by_number in Commerce Core 7
Loads an order by number.
2 calls to commerce_order_load_by_number()
- CommerceOrderCRUDTestCase::testCommerceOrderCrud in modules/
order/ tests/ commerce_order.test - Test the order CRUD functions.
- commerce_order_ui_redirect_form_validate in modules/
order/ commerce_order_ui.module - Validate callback: ensure a valid order was specified for viewing.
File
- modules/
order/ commerce_order.module, line 763 - Defines the core Commerce order entity and API functions to manage orders and interact with them.
Code
function commerce_order_load_by_number($order_number) {
$orders = commerce_order_load_multiple(array(), array(
'order_number' => $order_number,
));
return $orders ? reset($orders) : FALSE;
}