Change a product
wp_wc_update_productWooCommerce: change a product's regular price, sale price, stock quantity or status. Only the fields given change; all of them are checked before anything is written, so a refused call (bad price, unknown status, unknown id) leaves the product as it was. Returns updated and the product as saved (the fields of wp_wc_get_product). Needs manage_woocommerce and the right to edit this product (edit_product), which a site can withhold for single products; no undo point is recorded. Requires WooCommerce. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Product id. | |
| stock | No | Stock quantity (enables stock management). | |
| status | No | publish, draft, pending, private or future. | |
| sale_price | No | Same form as regular_price; empty clears the sale price. | |
| regular_price | No | Plain number of at least 0, written with "." or the shop's own decimal separator and nothing else (no grouping, no exponent); empty clears the price. |