Viewing 13 replies - 1 through 13 (of 13 total)
  • Navigate to your theme folder (wp-content/themes/your-theme) and find the functions.php file. Add the following code to it:

    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );

    Solution provided by https://gist.github.com/rynaldos/90196ab3750611f56997f7e40260deb0

    It worked for me.

    Thread Starter logueslinc

    (@logueslinc)

    Perfect, thank you!

    Hello, it didn’t work for me, any other solution ? Thanks.

    It didn’t work for me too, any other solution? Regards.

    didn’t work for me either for some reason, using:
    Woo 3.0.5
    WP 4.7.4

    This does not work for me either I tried applying this code to functions.php and it did nothing.

    WP 4.8.1
    WooCommerce 3.1.1

    Can someone please help?

    This code looks right for the default theme, but themes vary. What theme are you using?

    The site is using a Avada Theme. I’m trying to help a customer that already had a WP site and needs just a few things fixed. I’ve tried everything it seems but can’t get this removed. The site may have been somewhat customized by a previous developer. I had jumping into the middle of things not knowing what was done.

    www.remarpro.com forum members don’t have access to commercial themes.

    Best guess is that the theme or a previous developer has already used the remove_action() from CreativeCaro’s post above to remove the default WooCommerce action, then replaced it with a custom one. To remove the custom one, you need to find it and the priority it used. Your new remove-action() priority to remove the custom add_action() must be the same as that used in the corresponding add_action().

    Have a look in:
    wp-content/themes/avada/woocommerce/content-single-product.php
    if not, the themes functions.php, if not look for something like
    wp-content/themes/avada/includes/template_hook.php

    If necessary, you’ll need to download all the website files onto your hard disk. File zilla will make short work of that, then you can text-search them.

    Ok, thanks Iorro. I’ll give it a go.

    The following code will work in the latest version:

    add_filter('woocommerce_product_related_posts_query', '__return_empty_array', 100);
    

    With WordPress 4.8.1, Avada theme 5.2.2 and Woocommerce 3.1.2, worked the following CSS:

    .related.products {
    display: none;
    }

    Great, Marsen, CSS works perfectly!
    Thanks

    andrea

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Remove related products WooCommerce 3.0.1’ is closed to new replies.