wp_refund_order
Refund a WooCommerce order using the order ID, specifying amount, reason, and confirmation. Optionally restock returned items to keep inventory accurate.
Instructions
Create a WooCommerce order refund. confirm:true required. Requires wp_mcp_allow_wc_refunds setting.
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": {
"id": "<id>"
},
"name": "wp_refund_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Order ID | |
| amount | No | Refund amount (defaults to order total) | |
| reason | No | ||
| confirm | No | Required when safe mode is enabled | |
| restock | No | Restock refunded items |