You are here

function commerce_order_save in Commerce Core 7

Saves an order.

Parameters

$order: The full order object to save. If $order->order_id is empty, a new order will be created.

Return value

SAVED_NEW or SAVED_UPDATED depending on the operation performed.

21 calls to commerce_order_save()
CommerceBaseTestCase::createDummyOrder in tests/commerce_base.test
Create a dummy order in a given status.
CommerceOrderCRUDTestCase::testCommerceOrderCrud in modules/order/tests/commerce_order.test
Test the order CRUD functions.
CommerceOrderCRUDTestCase::testCommerceOrderTokens in modules/order/tests/commerce_order.test
Test order Token replacement.
commerce_cart_checkout_form_cancel_submit in modules/cart/commerce_cart.module
Submit handler to take back the order to cart status on cancel in checkout.
commerce_cart_line_item_views_form_submit in modules/cart/commerce_cart.module
Submit handler to show the shopping cart updated message.

... See full list

File

modules/order/commerce_order.module, line 748
Defines the core Commerce order entity and API functions to manage orders and interact with them.

Code

function commerce_order_save($order) {
  return entity_get_controller('commerce_order')
    ->save($order);
}