Update WooCommerce Product Variation
woocommerce_update_product_variationUpdate pricing, stock, or SKU of an existing product variation. Only specified fields are modified.
Instructions
Update fields on an existing product variation (pricing, stock, SKU). Only supplied fields are changed.
Args:
product_id, variation_id (number, required)
Any subset of: sku, regular_price, sale_price, manage_stock, stock_quantity, stock_status
response_format ('markdown'|'json'): default 'markdown'
Returns: The updated variation object.
Error Handling:
Returns "Error: Resource not found (404)" if the IDs don't match an existing variation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | ||
| product_id | Yes | ||
| sale_price | No | ||
| manage_stock | No | ||
| stock_status | No | ||
| variation_id | Yes | ||
| regular_price | No | ||
| stock_quantity | No | ||
| response_format | No | Output format: 'markdown' for human-readable text or 'json' for machine-readable structured data | markdown |