Home Forums WoodMart – Premium Template Remove Upsells from Single Product page

This topic contains 3 replies, has 2 voices, and was last updated by Artem Temos Artem Temos 1 year, 6 months ago.

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

    miguel1876
    Customer

    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

    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
    Customer

    That worked. Thank you so much!

    #38473

    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.