stock_quantity not updating
-
We’re using API to update stock quentity. Request is:
https://www.oursite.com/nz/wp-json/wc/v2/products/23724/variations/batch?consumer_key=ck_<OUR_KEY>&consumer_secret=cs_<OUR_SECRET>, {“update”:[“id”:”23732″,”stock_quantity”:”1.0″},{“id”:”23731″,”stock_quantity”:”5.0″}]}
And response is returned:
{ "update": [ { "id": 23732, "date_created": "2020-02-11T13:06:18", "date_created_gmt": "2020-02-11T00:06:18", "date_modified": "2021-02-25T17:09:38", "date_modified_gmt": "2021-02-25T04:09:38", "description": "<p><strong>40L</strong> 520 (D) x 920 (H) mm; 20kg</p>\n", "permalink": "https://www.oursite.com/nz/product/hydropress-20l-40l/?attribute_sizes=40L", "sku": "SP22600-01", ... "tax_status": "taxable", "tax_class": "", "manage_stock": "parent", "stock_quantity": 0, "in_stock": false, "backorders": "no", "backorders_allowed": false, "backordered": false, "weight": "", "dimensions": { "length": "", "width": "", "height": "" }, "shipping_class": "nz-freight-included", "shipping_class_id": 178, "image": { ... }, "attributes": [ { ... } }, { "id": 23731, "date_created": "2020-02-11T13:06:17", "date_created_gmt": "2020-02-11T00:06:17", "date_modified": "2021-02-25T17:09:38", "date_modified_gmt": "2021-02-25T04:09:38", "description": "<p><strong>20L</strong> 440 (D) x 830 (H) mm; 14kg</p>\n", "permalink": "https://www.oursite.com/nz/product/hydropress-20l-40l/?attribute_sizes=20L", "sku": "SP22620-01", ... "tax_class": "", "manage_stock": "parent", "stock_quantity": 0, "in_stock": false, "backorders": "no", "backorders_allowed": false, "backordered": false, "weight": "", "dimensions": { "length": "", "width": "", "height": "" }, "shipping_class": "nz-freight-included", "shipping_class_id": 178, "image": { ... }, "attributes": [ ... } } ] }
ie response is valid but stock remains at zero.
Why?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘stock_quantity not updating’ is closed to new replies.