Skip to content
Advertisement

Disable item name link for specific product in Woocommerce cart checkout and orders

I’m looking to disable the product link to the product page of a specific product in the cart. This product is a gift product automatically added to the cart when the cart subtotal amount equals a particular value.

I know it’s possible to do this with all the cart items. But I’m not quite sure on how to target a specific item.

Advertisement

Answer

New answer that works for all product types for an array of defined products Ids, here:
Disable item link for specific products in WooCommerce cart checkout and orders

Updated: Added a hooked function to handle minicart

To remove the item name link from cart, checkout and orders, use the following:

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
2 People found this is helpful
Advertisement