How to Remove Related Products on a WooCommerce Product Page

If you purchase through a link on our site, we may earn a commission. Learn more.

On a single product page, WooCommerce shows related products by default. Here's the code snippet you need to put in your theme's functions.php in order to disable this feature.
Table of Contents
WP Engine High Performance Hosting
BionicWP Hosting

logo woocommerce

On a single product page, WooCommerce shows related products by default. Here’s the code snippet you need to put in your theme’s functions.php in order to disable this feature:

/* Remove WooCommerce Related Products */
add_filter('woocommerce_product_related_posts_query', '__return_empty_array', 100);

If you’re using a theme designed specifically for WooCommerce, you might be able to remove the related posts without any code by using the theme customizer.

Jean Galea

Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.

Discover more from our archives ↓

Popular articles ↓

3 Responses

Share Your Thoughts

Your email address will not be published. Required fields are marked *

Claim Your Free Website Tip 👇

Leave your name, email and website URL below to receive one actionable improvement tip tailored for your website within the next 24 hours.

"They identified areas for improvement that we had not previously considered." - Elliot

By providing your information, you'll also be subscribing to our weekly newsletter packed with exclusive content and insights. You can unsubscribe at any time with just one click.