Remove Cart Collaterals From the Cart Page
This is a Developer Level doc.
If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.
Using this PHP snippet requires OceanWP 3.4.2 version or above.
To remove Cart Collaterals (Cross-Sell) item from the WooCommarce Cart page, add the following PHP snippet:
function owp_cart_coll_woo() { remove_action( 'woocommerce_cart_collaterals', array( OceanWP_WooCommerce_Config::instance(), 'cross_sell_display' ) ); } add_action( 'wp_head', 'owp_cart_coll_woo' );
All PHP snippets should be added via a child theme's functions.php file.