Override stock count in woocommerce

I am trying to create a custom stock logic (where each country has its own stock).

I have created two meta fields, stock_us and stock_row (rest of the world)

I want to override the default stock in woocommerce with these two meta. In other words, when a user adds a visits the site, i will fetch the stock of the product based on geo location but im unable to override the stock count with my custom meta.

I want to know how do i over ride the default stock quantity with a custom value based on some condition.

Thanks in advance.

Read more here:: Override stock count in woocommerce

Leave a Reply

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