Remove upsell items from single product page.
-
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>
Hello,
Try to use this code snippet
remove_action( 'basel_woocommerce_after_sidebar', 'woocommerce_upsell_display', 10 );
Regards
Yes tried that, didn’t work so was why I opened the ticket.
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