How to Remove Product Links from Your WooCommerce Cart

The cart template provided by WooCommerce is a pretty inflexible piece of the plugin. The default layout comes with a lot of small design choices and pieces of information that are not always worth including and can sometimes be frustrating for store owners to have to deal with.

One such feature is the automatic inclusion of product links inside the cart’s list of items your customers are purchasing. These links are meant to give your buyers an easy way to go back and look at what they have in their cart in more detail. Of course, you might not want to give them that choice or perhaps you are adding items automatically to the cart and don’t need that extra piece of navigation to be available.

Cart Product Link in WooCommerce
An example Cart Product Link in WooCommerce

Removing these product links from the cart can be accomplished with a little bit of theme editing or by using our Remove WooCommerce Features plugin.

How to Disable Product Links from the WooCommece Cart with Code

The code you need to add to disable product links must go inside of your theme’s functions.php file. You can find this file by navigating your way to your theme’s base directory. Download and open the file in a text editor and then add the following lines of code yourself near the bottom of the file.

add_filter( 'woocommerce_cart_item_permalink', 'my_remove_cart_product_link', 10 );
function my_remove_cart_product_link() {
    return __return_null();

Save the functions.php file and upload it back to your theme’s directory. If you did everything correctly you should immediately notice the product links have been removed from your cart template. The product links will remain if you didn’t type in the code correctly and it’s also possible you can temporarily break yoursite if you make a mistake inside of the functions.php file.

Changes made to the functions.php file will be removed whenever your theme has an update. Keep in mind you will have to redo this code change inside of functions.php every time your theme is updated.

Anyone concerned with possibly taking their site down while working on disabling product links should consider paying a WordPress developer to handle this for them or give our Remove WooCommerce Features plugin a try.

How to Remove Product Links from the WooCommerce Cart Template in Seconds

Our plugin, Remove WooCommerce Features, offers a three click way to disable product links in your cart template. Once you have purchased and installed the plugin:

Step #1

Go to the WooCommerce section of your WordPress installation’s admin menu and click the link that says “Remove Features.”

WooCommerce Admin Menu

Step #2

Find the setting for “Cart Product Link” and click the checkbox so that it’s marked like so:

Remove WooCommerce Features - Cart Product Link

Step #3

Press the “Save Settings” button.

Save Settings Button

Remove WooCommerce Features will disable product links from your cart as soon as you’ve hit the save button. Your setting will remain no matter how many times your theme is updated or changed as well. You’ll never have to edit any code or remember to pay your WordPress developer again to take care of this problem if you use our plugin.

The plugin handles a bunch of other features as well that are commonly frustrating to WooCommerce users. With Remove WooCommerce Features you can:

The entire list of WooCommerce features our plugin interacts with is available here on the site if you want to learn more about what Remove WooCommerce Features can do for you.