malw
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [WooCommerce] Stock level stuck on rest api updateHi,
The problem is solved. The website/shop partner updated woocommerce and maybe wordpress and some other apps. Sorry about the lack of details about this.
The REST call itself is completely the same as before.
- This reply was modified 3 years, 4 months ago by malw.
Forum: Plugins
In reply to: [WooCommerce] Stock level stuck on rest api updateYou mean that stock status needs to be added to the body, even though stock status does not change. Since inventory level is positive before and after post.
Forum: Plugins
In reply to: [WooCommerce] Stock level stuck on rest api updateHi,
Correct, it’s the stock levels on product variations.
I am sending this body:
{
"manage_stock": true,
"stock_quantity": 78
}
As PUT to this endpoint: …wp-json/wc/v3/products/2214/variations/2217/ Getting nice response:
…
"manage_stock": true,
"stock_quantity": 78,
"stock_status": "instock",
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
… But when doing get against same endpoint 5 sec later (or instantly) i see old stock:
…
"manage_stock": true,
"stock_quantity": 58,
"stock_status": "instock",
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
… I am able to update the parent item. I have played around with parent item setup (setting stock to 100, setting to nothing, setting manage stock to false/true) nothing works.
Viewing 3 replies - 1 through 3 (of 3 total)