You are here

function hook_commerce_order_delete in Commerce Core 7

Respond to order deletion.

The order will still exist and allows you to take an action before it is completely removed.

Parameters

$order: The order object that is being deleted.

2 functions implement hook_commerce_order_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

commerce_cart_commerce_order_delete in modules/cart/commerce_cart.module
Implements hook_commerce_order_delete().
commerce_payment_commerce_order_delete in modules/payment/commerce_payment.module
Implements hook_commerce_order_delete().

File

modules/order/commerce_order.api.php, line 191
Hooks provided by the Order module.

Code

function hook_commerce_order_delete($order) {
  commerce_cart_order_session_delete($order->order_id);
  commerce_cart_order_session_delete($order->order_id, TRUE);
}