Increase stock when ordering in WooCommerce

I am currently working on a WordPress project using WooCommerce and I need a really specific feature (not included in WooCommerce):

How to increase stock when an order is complete instead of decreasing it ?

What I have found so far is that I might need to use Woocommerce API in order to accomplish that WC_AJAX::increase_order_item_stock();. Nevertheless I am not really comfortable using complex PHP…

Do you have some lines of thinking to accomplish this?
Maybe using a plugin (which I did not find)? Or with raw code?

To sum up everything: I want to build a website for a restaurant with an inventory management and the possibility for cooks to order goods from different suppliers. So when a cook order something from the woocommerce shop page, purchased items’s inventory have to increase and not decrease.

I have tried different things like ‘WC Vendors’ or ‘Marketplace’ but without success…

Thanks.

Read more here: Increase stock when ordering in WooCommerce

Leave a Reply

Your email address will not be published. Required fields are marked *