function commerce_payment_commerce_order_delete in Commerce Core 7
Implements hook_commerce_order_delete().
Make sure all payment transactions are deleted whenever the order they are associated with is deleted.
File
- modules/
payment/ commerce_payment.module, line 504 - Defines the payment system and checkout integration.
Code
function commerce_payment_commerce_order_delete($order) {
foreach (commerce_payment_transaction_load_multiple(array(), array(
'order_id' => $order->order_id,
)) as $transaction) {
commerce_payment_transaction_delete($transaction->transaction_id);
}
}