Delete WooCommerce Order
woocommerce_delete_orderDelete a WooCommerce order by its ID. Default moves to trash; set force=true for permanent deletion.
Instructions
Delete an order. By default this moves the order to the trash (recoverable); set force=true to permanently delete it.
Args:
order_id (number, required)
force (boolean, default false)
Returns: Confirmation with the deleted order's id, number, and status.
Error Handling:
Returns "Error: Resource not found (404)" if order_id doesn't exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | If true, permanently delete instead of moving to trash (default: false) | |
| order_id | Yes | The numeric WooCommerce order ID to delete |