so my problem is when someone submit an order and complete it stocks only getting reduced from that specific products which is variable of a product, for example: There is product of Pen in total of 10 which are Blue and Red so we set stock of 10 in inventory and then in variations we set 5 for red and 5 for blue when some one order a Blue Pen stocks of Blue become 4 but total stocks are still 10 which it should reduce to 9 as well.

is there any function to fix it ? like when someone order a variable product, woocommerce reduce total of inventory and stocks of that variable product by 1 too

my guess is somehow it should reduce by get_stock_quantity();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.