Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #948315

    Hi Team,

    I’ve tried several ways to remove/hide the related/upsells products section on the single product page but with no success. I’m using the latest version of Enfold as well as the latest WooCommerce and WordPress as well.

    Am using this in the functions.php but does not seem to work.

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

    And this:

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

    Did not work.

    So, decided to give this a try instead using this quick CSS:

    .related.products {
        display: none;
    }

    Sadly, it did not work too.

    Any advice is greatly appreciated.

    Best regards,
    Eric.

    #948952

    Hey Eric,

    Here is the code you can put in your funtions.php

    
    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 20);
    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_upsells', 21); 
    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_display_output_upsells', 30);
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #948969

    Hi Victoria,

    Ah, the code works perfectly.

    Thanks a bunch Victoria! Great help. Feel free to close this thread.

    Best regards,
    Eric.

    #949403

    Hi Eric,

    Great, glad we could help. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Removing The Related Products/Upsells Section’ is closed to new replies.