update_stock
Set a product's stock quantity and enable stock management for it, or target a specific variation by passing variation_id.
Instructions
Set a product's stock quantity and turn on stock management for it. Pass variation_id to set one variation of a variable product. Needs WC_ALLOW_WRITES=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quantity | Yes | ||
| product_id | Yes | ||
| variation_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||