ppwp-disable-related-woocommerce-products

How to Remove Related Products in WooCommerce

When it comes to e-commerce, engaging customers to add extra items to the shopping cart is always encouraged. That’s why WooCommerce allows you to show up related products on the product detail page by default, which helps up-sell and cross-sell the purchasers. Customers can view other products in your store and properly increase the order sizes.

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

For example, the buyer has put a pair of glasses in his cart, then he is recommended some other brandy glasses at the bottom of the product page. This pushes him to start making some research about the new ones before deciding which to pay for. As a result, he might get distracted and leave your store without buying anything. Then, you lose that sale.

This article will show you how to manually remove related products in a single WooCommerce product page and also introduce some plugins to simplify this removal process.

Ways to Remove Related Products in WooCommerce

There are 2 paths you can take to disable related WooCommerce products, either inserting some lines of code to your theme’s functions.php file or installing a free plugin. Let’s get started with the first method.

Option 1: Editing the theme’s functions.php file

This method includes 2 main steps to turn off WooCommerce related products manually:

Step 1: Create a child theme

It’s necessary to create a child theme and make changes there since your custom code can be deleted when you update the parent theme.

You can go to your theme directory, create a new folder with a new name. Reference the detailed guide to create a child theme here.

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

Insert the following code to your theme’s fuctions.php file at the bottom of the file or right before the ?> ending 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 coding and themes. If you’re a non-tech savvy, think of a plugin to simplify the related product removal process.

Option 2: Using NS Remove Related Products for WooCommerce plugin

ppwp-ns-remove-related-woocommerce-products

NS Remove Related Products for WooCommerce offers a complete solution to shield the related products from your shop page. All you need to do involves installing, activating, enabling the plugin and letting it handle the job.

  1. Go to Add New under Plugins in your WordPress dashboard menu
    add-new-plugin
  2. Search for NS Remove Related Products for WooCommerce in the Keyword box
    ppwp-ns-remove-related-woo-products
  3. Hit Install and Activate buttons
    ppwp-ns-plugin
  4. Click on the Remove Related icon inserted in the sidebar
    ppwp-remove-related
  5. Tick on Enabled Plugin then save your changes
    ppwp-enable-ns-plugin

Since the free version enables you to hide related WooCommerce products only, you need to upgrade to the Pro version to expand 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’s possible to adjust the number of shown products through the “Number of related product” option.

What’s more, instead of displaying products randomly, you can arrange them by product IDs, inserted date, modified date, or by title. Ordering WooCommerce products by ASC (from top to bottom) and DESC (from bottom to top) is available, too.

In case you don’t want to shield related products on all the product pages but some specific pages, head to individual pages and make changes there.

What If You Intend to Protect WooCommerce Products?

There might be times you want to do more than just hiding related products. Some products need protection so that only authorized or premium users/customers are able to access and make purchases. For instance, you sell adult products or services such as tobacco. Password protecting these types of products prevents underage visitors from accessing them.

A password protection plugin comes into play in this case. Your products won’t be listed publicly in your WooCommerce store. Only those with the correct passwords are able to view the private products.

Among numerous password protection plugins out there, Password Protect WordPress Pro proves one of the most effective solutions. The plugin allows you to lock WooCommerce products with a password. You can protect product pages with some simple clicks.

How to password protect WooCommerce products with PPWP Pro

Upon installation (similar to the first 3 steps of installing the NS Remove Related Products for WooCommerce plugin), the plugin is added directly to your WordPress dashboard navigation menu. To get started password protecting WooCommerce products, follow the 6-step guide below:

  1. Click Password Protect WordPress to visit the Settings page
  2. Select Products in the Post Type Protection section
    ppwp-password-protect-woocomerce-products
  3. Save your changes
  4. Head to Products under WooCommerceAll Products and choose your desired product page
  5. Hover the product name and click Edit
  6. Toggle the option Password protected on the top right side of the editing screen
    ppwp-password-protect-woo-products

Your product page is assigned a password now. In other words, it won’t show up in your WooCommerce store and on any search results pages. If you want to allow users to see the private product on Google and other search engines, just switch off the option Block Search Indexing.

block-search-indexing-ppwp

There is a lot more you can do with the protected page through PPWP Pro. You can set cookies expiration which authorizes users to access the protected products in a certain period of time without re-entering passwords. The default period is 7 days.

ppwp-settings-page-features

Whitelisted roles, including Admins, Page’s Author, or a Login user, etc can view the secure products without a password request. Just leave No one when you would like all types of users to fill in the password form.

On top of that, all child product pages will be automatically locked once you protect their parent product page. The same thing goes for product categories and their posts.

Take Actions to Remove WooCommerce Related Products

You try different ways to boost sales to your store, from creating a WooCommerce one-page checkout to using the best WooCommerce social login plugins to simplify the checkout process.

Still, disabling related products on WooCommerce single product pages prove an effective solution to optimize your WooCommerce store. There are different methods you can apply to achieve this, both technical and non-technical.

Adding code requires you to make changes to the theme’s functions.php file. “NS Remove Related Products for WooCommerce” plugin, meanwhile, makes it a clear-cut winner in removing related products due to its powerful features and friendly UI.

In case you don’t intend to hide related products but protect WooCommerce products from the public view, give PPWP Pro a try. Only those with the correct password are permitted to view the private products.

If you have any questions about how to remove related products or protect WooCommerce products, let us know in the comment section below!