woo_update_coupon
Modify a WooCommerce coupon by sending only the fields you want to change, leaving all other coupon settings unchanged.
Instructions
Update a coupon; only the given fields change
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": {
"site": "<site>",
"id": "<id>"
},
"name": "woo_update_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Coupon ID | |
| code | No | Coupon code | |
| site | Yes | Site id (see list_sites) | |
| amount | No | Discount amount as decimal string (default "0") | |
| product_ids | No | Products the coupon applies to | |
| usage_limit | No | Total usage limit | |
| date_expires | No | Expiry date (YYYY-MM-DD) | |
| discount_type | No | Discount type (default fixed_cart) | |
| free_shipping | No | Grants free shipping (default false) | |
| individual_use | No | Cannot be combined with other coupons (default false) | |
| maximum_amount | No | Maximum cart subtotal as decimal string | |
| minimum_amount | No | Minimum cart subtotal as decimal string | |
| excluded_product_ids | No | Products the coupon does not apply to | |
| usage_limit_per_user | No | Usage limit per customer |