WooCommerce - How To Remove Cross-Sell Products Block - TemplateTrip Help

Mega Monsoon Days Sale

Limited-time deal: Up to 70% off Hurry before it ends!
Save Now

Days

Hrs

Min

Sec

Product successfully added to your shopping cart.

WooCommerce – How to Remove Cross-Sell Products Block

Table of Contents

1.) Open the functions.php file located under the “wp-content/themes/theme_name” folder.

Add the following code to the very end of the file:

remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_cross_sell_display’);

2.) In case the cross-sell products block still persists, please, open the “wp-content/themes/theme_name/inc/woocommerce-hooks.php” file.

Find the following line of code:

remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_cross_sell_display’ );

3.) Near this line, you will see the line like the one below, which should be removed or commented out:

add_action( ‘woocommerce_cart_collaterals’, ‘monstroid2_woocommerce_cross_sell_display’

Note, in case you are using a child theme, you should copy the woocommerce-hooks.php file to the child theme folder preserving nested folders structure.

4.) Save the file, your cross-sell products block is removed. Refresh your cart page and see it in action!