Skip to content

WooCommerce - Update Product

This module allows updating any field of an existing product, identifying it by ID or SKU.

FieldTypeRequiredDescription
credentials_idstringYesCredentials ID
product_idnumberConditionalProduct ID
skustringConditionalProduct SKU (alternative to ID)
namestringNoNew name
statusstringNoNew status
descriptionstringNoNew description
short_descriptionstringNoNew short description
new_skustringNoNew SKU
regular_pricestringNoNew regular price
sale_pricestringNoNew sale price
manage_stockbooleanNoManage stock
stock_quantitynumberNoNew quantity
stock_statusstringNoNew stock status
weightstringNoNew weight
length, width, heightstringNoNew dimensions
categoriesstring/arrayNoNew categories
tagsstring/arrayNoNew tags
featuredbooleanNoFeature product

Either product_id OR sku is required to identify the product.

FieldDescriptionExample
urlWooCommerce store base URLhttps://my-store.com
consumer_keyREST API Consumer Keyck_xxxx...
consumer_secretREST API Consumer Secretcs_xxxx...
{
"success": true,
"product": {},
"product_id": 123,
"fields_updated": ["name", "regular_price", "stock_quantity"],
"message": "Product 123 updated successfully"
}
{
"credentials_id": "woo_tienda",
"product_id": 123,
"regular_price": "39.99",
"sale_price": "29.99"
}
{
"credentials_id": "woo_tienda",
"sku": "PROD-001",
"stock_quantity": 50,
"stock_status": "instock"
}
{
"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 (not sku)
  • Only the fields you specify are updated
  • Categories are completely replaced (not appended)
  • Images are also replaced if specified
  • WooGetProducts - Get products to then update them
  • WooCreateProduct - Create a new product
  • WooGetOrders - Get orders that include the product