woo_update_variation
Updates selected fields of an existing WooCommerce product variation without altering unspecified values, enabling targeted changes to price, stock, SKU, or attributes.
Instructions
Update a product variation; 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>",
"product_id": "<product_id>",
"variation_id": "<variation_id>"
},
"name": "woo_update_variation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | SKU (must be unique) | |
| site | Yes | Site id (see list_sites) | |
| attributes | No | Attribute map, e.g. {"pa_color": "red", "size": "XL"} (key: attribute taxonomy or custom attribute name; value: term slug or option; "" = any) | |
| product_id | Yes | Parent product ID | |
| sale_price | No | Sale price as decimal string ("" removes it) | |
| manage_stock | No | Track stock quantity | |
| stock_status | No | Stock status | |
| variation_id | Yes | Variation ID | |
| regular_price | No | Regular price as decimal string | |
| stock_quantity | No | Stock quantity |