Update WooCommerce Coupon
woocommerce_update_couponUpdate an existing WooCommerce coupon's fields such as code, discount type, amount, expiry date, usage limits, and free shipping. Modify only supplied fields.
Instructions
Update fields on an existing coupon. Only supplied fields are changed.
Args:
coupon_id (number, required)
Any subset of: code, discount_type, amount, description, date_expires, usage_limit, usage_limit_per_user, free_shipping, minimum_amount, maximum_amount
response_format ('markdown'|'json'): default 'markdown'
Returns: The updated coupon object.
Examples:
Use when: "extend coupon 12's expiry to end of year" -> coupon_id=12, date_expires="2026-12-31"
Error Handling:
Returns "Error: Resource not found (404)" if coupon_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": {
"coupon_id": "<coupon_id>"
},
"name": "woocommerce_update_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| amount | No | ||
| coupon_id | Yes | The numeric WooCommerce coupon ID to update | |
| description | No | ||
| usage_limit | No | ||
| date_expires | No | YYYY-MM-DD | |
| discount_type | No | ||
| free_shipping | No | ||
| maximum_amount | No | ||
| minimum_amount | No | ||
| response_format | No | Output format: 'markdown' for human-readable text or 'json' for machine-readable structured data | markdown |
| usage_limit_per_user | No |