Wooocommerce disable check_cart_item_stock if cart item has specific meta
I add birthlist functionnality to my woocommerce store. I would like to authorize the order of an out-of-stock product only if the product is purchased on the birthlist.
On my function to add a product to the shopping cart from the birthlist, I skip the stock availability check. The product is now added to the cart. I also add a meta to the item in the cart with the birthlist ID.
But on cart I got an error cart and checkout about stock.
How to deactivate the stock check of the shopping cart programmatically.
Actually woocommerce make this check on includes/class-wc-cart.php in check_cart_item_stock method
Leave an answer
You must login or register to add a new answer .