How to Remove Related Products in WooCommerce

When it comes to e-commerce, it always makes sense to encourage customers to add additional items to their shopping cart. That’s why WooCommerce allows you to display related products on the product detail page by default, which helps shoppers upsell and cross-sell. Customers can view other products in your store and increase order quantities accordingly.

Unfortunately, sometimes these related products don’t work as effectively as store owners expect. They can confuse visitors, which can lead to no sales at all.

For example: the shopper has added a pair of glasses to their cart, then other shot glasses are recommended to them at the bottom of the product page. This prompts them to find out about the new glasses before deciding which ones they want to buy. This can lead to the visitor being distracted and leaving your store without buying anything, resulting in you losing that sale.

This article will show you how to manually remove related products on a single WooCommerce product page and also introduce you to some plugins that will make this process easier.

Ways to remove related products in WooCommerce

There are 2 ways to disable related products in WooCommerce: Either add a few lines of code to your theme’s functions.php file, or install a free plugin. Let’s start with the first method.

Option 1: Edit the functions.php file of the theme

This method involves 2 main steps to manually disable WooCommerce related products:

Step 1: Create a child theme

It is necessary to create a child theme and make changes there, as your custom code can be deleted when you update the parent theme.

To do this, go to your theme directory and create a new folder with a new name. You can find detailed instructions on how to create a child theme here.

Step 2: Add a few lines of code to the functions.php file of your child theme

Add the following code to the functions.php file of your theme, either at the end of the file or directly before the closing ?> tag:

/**
* Remove related products output
*/
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);

Editing the functions.php file is a developer-level method that requires you to be familiar with programming and themes. If you are not tech-savvy, you should consider a plugin that simplifies the removal of related products.

Option 2: Using the NS Remove Related Products for WooCommerce plugin

ppwp-ns-remove-related-woocommerce-products

NS Remove Related Products for WooCommerce offers a complete solution to remove the related products from your store page. All you need to do is install the plugin, activate it, enable it and let it do the work.

Go to Add New under Plugins in your WordPress dashboard menu.

In the Keyword field, search for NS Remove Related Products for WooCommerce.

Click on the Install and Activate buttons.

Click on the “Remove Related” icon in the sidebar

Click on “Enabled Plugin” and save your changes

As you can only hide related WooCommerce products with the free version, you will need to upgrade to the Pro version to extend its features.

ppwp-ns-remove-woo-product-features

You can show or hide the related products not only for the public but also for registered users. And it is possible to set the number of products displayed via the “Number of related products” option.

In addition, you can arrange the products not only randomly, but also by product IDs, insert date, modified date or title. You can also arrange WooCommerce products by ASC (top to bottom) and DESC (bottom to top).

If you do not want to display related products on all product pages, but only on certain pages, you can go to the individual pages and make changes there.

What to do if you want to protect WooCommerce products?

You may want to do more than just hide related products. Some products need to be protected so that only authorized or premium users/customers can access them and make purchases.

For example, you may sell adult products or services such as tobacco products. Password protection for these types of products prevents underage visitors from accessing them.

In this case, a password protection plugin comes into play. Your products are not listed publicly in your WooCommerce store. Only people with access to the correct passwords will be able to see the private products.

Among the numerous password protection plugins available, Password Protect WordPress Pro proves to be the most effective solution. The plugin allows you to lock WooCommerce products with a password, and you can protect product pages with a few simple clicks.

How to password protect WooCommerce products with PPWP Pro

Once installed (similar to the first 3 steps of installing the NS Remove Related Products for WooCommerce plugin), the plugin will be added directly to the navigation menu of your WordPress dashboard.

To get started with password protection for WooCommerce products, follow the 6-step guide below:

Click Password Protection for WordPress to go to the Settings page. Next, select Products in the Post Type Protection section.

Make save your changes. Then, go to Products under WooCommerce → All Products and select the desired product page. Move the mouse pointer over the product name and click Edit. You can activate the Password protected option at the top right of the edit screen.

Your product page is now password protected. This means that it will not be displayed in your WooCommerce store or on search results pages. If you want to allow users to see the private product on Google and other search engines, simply switch off the Block search indexing option.

block-search-indexing-ppwp

With PPWP Pro, you can do much more with the protected page. You can set the expiration of cookies that allow users to access the protected products in a certain period of time without re-entering the passwords. The default period is 7 days.

ppwp-settings-page-features

Roles that are on the whitelist, such as admins, site authors or login users, can view the protected products without having to enter a password. Simply leave Nobody if you want all types of users to complete the password form.

In addition, all subordinate product pages are automatically blocked as soon as you protect their parent product page. The same applies to product categories and their posts.

Measures for removing WooCommerce-related products

There are various different ways to increase sales on your store, from creating a one-page WooCommerce checkout to using the best WooCommerce social login plugins to simplify the checkout process.

Nevertheless, disabling related products on individual WooCommerce product pages proves to be an effective solution for optimizing your WooCommerce store. As we’ve shown, there are several methods you can use to accomplish this, both technical and non-technical.

Adding code requires you to make changes to the theme’s functions.php file. the NS Remove Related Products for WooCommerce” plugin is a clear winner when it comes to removing related products due to its powerful features and user-friendly interface.

If you don’t intend to hide related products but want to protect WooCommerce products from public view, you should try PPWP Pro. This way, only those who have the correct password will be allowed to see the private products.