Home Forums Basel support forum Remove upsell items from single product page.

Remove upsell items from single product page.

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

    tjcham
    Participant

    What would the code be to remove the upsells from the below the product on the single product page.

    Usual code to remove:

    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
    
    function remove_product_upsells() {
        if ( is_singular( 'product' ) && is_active_widget( false, false, $this->id_base ) ) {
            remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
        }
    }

    In single-product.php I see on line 43:

    <div class="container related-and-upsells">
    		<?php 
    			/**
    			 * basel_woocommerce_after_sidebar hook
    			 *
    			 * @hooked woocommerce_upsell_display - 10
    			 * @hooked woocommerce_output_related_products - 20
    			 */
    			do_action( 'basel_woocommerce_after_sidebar' );
    		 ?>
    	 </div>
    #4925

    Artem Temos
    Keymaster

    Hello,

    Try to use this code snippet

    remove_action( 'basel_woocommerce_after_sidebar', 'woocommerce_upsell_display', 10 );

    Regards

    #4928

    tjcham
    Participant

    Yes tried that, didn’t work so was why I opened the ticket.

    #4940

    Artem Temos
    Keymaster

    In this case please provide your admin access and FTP credentials so we could make a quick look and see why this code is not working for you.

    Regards

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