Viewing 5 replies - 1 through 5 (of 5 total)
  • I’d like to know about the related products too.

    I’ve got code to remove these, in a child functions.php, which had been working, but doesn’t seem to be any longer

    ‘/*
    * wc_remove_related_products
    *
    * Clear the query arguments for related products so none show.
    * Add this code to your theme functions.php file.
    */
    function wc_remove_related_products( $args ) {
    return array();
    }
    add_filter(‘woocommerce_related_products_args’,’wc_remove_related_products’, 10);’

    and just tried this

    ‘/* Disable Related products on single product pages */
    remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’,20);’

    Neither are working any more. Storefront 1.6.1

    This may have been happening for a while but I’ve only noticed whilst comparing a staged Storefront 2 for issues.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Related products:

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

    This goes in theme functions.php.

    For buttons, you can hide them with CSS display:none property.

    Turns out my ‘related products’ were actually ‘related posts’ from Jetpack. Disable that in Jetpack & they’re gone.

    Thread Starter tbfmonlineradio

    (@tbfmonlineradio)

    That remove_action didn’t work. Made no difference at all.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    tbfmonlineradio it does for wc core. So perhaps your theme is already moving things around, thus different hooks would be needed.

    I guess you can use CSS there too.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Read More/Add to Cart Remove Related Products’ is closed to new replies.