WooCommerce - Update Product
Description
Section titled “Description”This module allows updating any field of an existing product, identifying it by ID or SKU.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
credentials_id | string | Yes | Credentials ID |
product_id | number | Conditional | Product ID |
sku | string | Conditional | Product SKU (alternative to ID) |
name | string | No | New name |
status | string | No | New status |
description | string | No | New description |
short_description | string | No | New short description |
new_sku | string | No | New SKU |
regular_price | string | No | New regular price |
sale_price | string | No | New sale price |
manage_stock | boolean | No | Manage stock |
stock_quantity | number | No | New quantity |
stock_status | string | No | New stock status |
weight | string | No | New weight |
length, width, height | string | No | New dimensions |
categories | string/array | No | New categories |
tags | string/array | No | New tags |
featured | boolean | No | Feature product |
Either product_id OR sku is required to identify the product.
Credentials
Section titled “Credentials”| Field | Description | Example |
|---|---|---|
url | WooCommerce store base URL | https://my-store.com |
consumer_key | REST API Consumer Key | ck_xxxx... |
consumer_secret | REST API Consumer Secret | cs_xxxx... |
Output
Section titled “Output”{ "success": true, "product": {}, "product_id": 123, "fields_updated": ["name", "regular_price", "stock_quantity"], "message": "Product 123 updated successfully"}Usage Example
Section titled “Usage Example”Update price
Section titled “Update price”{ "credentials_id": "woo_tienda", "product_id": 123, "regular_price": "39.99", "sale_price": "29.99"}Update by SKU
Section titled “Update by SKU”{ "credentials_id": "woo_tienda", "sku": "PROD-001", "stock_quantity": 50, "stock_status": "instock"}Mark as out of stock
Section titled “Mark as out of stock”{ "credentials_id": "woo_tienda", "sku": "DISCONTINUED-001", "stock_status": "outofstock", "status": "private"}- If you use
sku, the product is first searched and then updated - To change the SKU, use
new_sku(notsku) - Only the fields you specify are updated
- Categories are completely replaced (not appended)
- Images are also replaced if specified
Related Nodes
Section titled “Related Nodes”- WooGetProducts - Get products to then update them
- WooCreateProduct - Create a new product
- WooGetOrders - Get orders that include the product