How to Remove Related Products on a WooCommerce Product Page

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.
Share on facebook
Share on twitter
Share on email
Share on facebook
Share on twitter
Share on email

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.

Table of Contents
Our Sponsors
Our sponsors

4 Responses

Leave a Reply

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

Stay up-to-date with the Mayor
Sign up to receive one weekly email about our latest reviews, tutorials, giveaways and more.