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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_id": "<order_id>"
},
"name": "woocommerce_delete_order"
}
}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 |