Home Forums WoodMart support forum Remove Upsells from Single Product page

Remove Upsells from Single Product page

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

    miguel1876
    Participant

    Hi guys
    I want to remove the Upsells section from the Single Product page.
    I tried both of these codes but nothing works:

    // Remove up sells from after single product hook
    remove_action( 'woodmart_before_sidebar_area', 'woocommerce_upsell_display', 20 );
    // Remove up sells from after single product hook
    remove_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_upsell_display', 10 );

    Can you please help?

    Thanks

    #38270

    Artem Temos
    Keymaster

    Hi,

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    function woodmart_remove_upsells() {
    	remove_action( 'woodmart_before_sidebar_area', 'woocommerce_upsell_display', 20 );
    	remove_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_upsell_display', 10 );
    }
    add_action( 'wp', 'woodmart_remove_upsells', 1100 );
    

    Regards

    #38446

    miguel1876
    Participant

    That worked. Thank you so much!

    #38473

    Artem Temos
    Keymaster

    You are welcome!

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Remove Upsells from Single Product page’ is closed to new replies.