How To Remove Related Products from WooCommerce

How To Remove Related Products from WooCommerce featured image

The code snippet below will allow you to remove related products from your WooCommerce store, in case you had everything in your store setup just right, and you didn’t want to feature cross sells in your site.

Cross sells and upsells

Its worth first understanding which related products are being displayed in your site (the code for which we won’t go into here) – so when testing, you should try adding a “cross sell” and an “up sell” to a product in your site, and seeing where these are displayed by your theme.

Where these are placed in your WooCommerce theme are really down to which theme you are using, though the description below will work on themes like WordPress Twenty Seventeen (i.e. the default wp theme!), or the WooCommerce Storefront theme to remove your site’s related products section.

Remove Related Products from WooCommerce

Add the below code to your theme’s functions.php file. This is best done in a child theme so your updates don’t get overwritten if you upgrade your theme.

function wc_remove_related_products( $args ) {
return array();
add_filter('woocommerce_related_products_args','wc_remove_related_products', 10);

Leave a comment below if this worked / didn’t work for you!

Get help and support with your WooCommerce store

If the above didn’t work for you, or you have other questions, and would to have accredited WooCommerce developers to check over your Woo store, please contact us.

Leave a Reply

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

Silicon Dales