Skip to content
Advertisement

Woocomerce Remove a specific cart items when adding to cart another specific items

Provided solution here Remove a specific cart item when adding to cart a specific product in Woocommerce works perfect for one product id.

Is any way to do this for multiple id’s?

Advertisement

Answer

Update 2 : The following code will work for multiple product IDs:

JavaScript

Code goes in function.php file of your active child theme (or active theme). Tested and works.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement