Support » Plugin: WooCommerce » Related products appearing on product page bottom

  • Resolved robmcp

    (@robmcp)


    Since v 3.0.1
    I now have Related products listed at the foot of all product pages, each with a nice (not) 60px high H2 tag content. Yuk.

    I don’t want to have related products display at all, but can find no way of hiding them I don’t want a plug in to do this – more maintenance. Have tried –

    function wc_remove_related_products( $args ) {
    return array();
    }
    add_filter( ‘woocommerce_related_products_args’,’wc_remove_related_products’, 10 );

    but this has not worked. My pre 3.0.1 version did not display them can anyone suggest how to stop this?
    I compared staging and live but cannot pin down anythign in theme functions php that may prevent display on live but not on staging.
    Any thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I noticed the same issue when I upgraded Woo on a test site. I had the code above in place on several sites and it no longer seems to work.

    I found this code on a forum that does seem to work:

    remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 );

    Thanks Holly.
    It seems a bit drastic to have to do that. I’d have thought that there would be a setting somewhere to turn this on and off. I mean it was not there to start with.

    This latest Woocommerce upgrade has left a lot of users with problems.

    Went for the code from Holly, thanks, it is working perfectly. Just seems a bit counter intuitive to have to do this rather than flicking a switch.
    Thanks again Holly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Related products appearing on product page bottom’ is closed to new replies.