Skip to content
Advertisement

Hide “remove item” from cart for WooCommerce product category

I would like to Hide “remove item” from cart for a specific product category in WooCommerce, just like in “Hide “remove item” from cart for a specific product in WooCommerce” answer thread, but for a specific product category.

Any help would be appreciated.

Advertisement

Answer

The following code will hide “remove item” from cart for a specific product category (that you will define in the 2nd function):

JavaScript

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

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