Function __global->delete_pending_orders_for_current_user
Definitions
sources/shopping.php
- Delete any pending orders for the current user. E.g. if cart purchase was cancelled, or cart was changed.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $keep_order_id | ?AUTO_LINK | No | No | Null | N/A | N/A | ID of order to not keep (null: none) |
| $purchase_through | ?string | No | No | Null | N/A | N/A | Only delete orders of this origin (null: no filter) |
Preview
Code (PHP)
/**
* Delete any pending orders for the current user. E.g. if cart purchase was cancelled, or cart was changed.
*
* @param ?AUTO_LINK $keep_order_id ID of order to not keep (null: none)
* @param ?string $purchase_through Only delete orders of this origin (null: no filter)
*/
function delete_pending_orders_for_current_user(?int $keep_order_id = null, ?string $purchase_through = null)
* Delete any pending orders for the current user. E.g. if cart purchase was cancelled, or cart was changed.
*
* @param ?AUTO_LINK $keep_order_id ID of order to not keep (null: none)
* @param ?string $purchase_through Only delete orders of this origin (null: no filter)
*/
function delete_pending_orders_for_current_user(?int $keep_order_id = null, ?string $purchase_through = null)

