Thread Starter
Ruben
(@rbnmo)
I found out the issue. It was because the product is a variable product but has no variations.
Thread Starter
Ruben
(@rbnmo)
Tried it and it still doesn’t work:
$new_stock = wc_update_product_stock($post_id, $qty, 'set', false);
wc_delete_product_transients($post_id);
I see this:
Out of stock (8)
Out of stock (3)
etc..
Thread Starter
Ruben
(@rbnmo)
Thank you very much, lorro!
I will try that and get back to you if it doesn’t work.