• Resolved goferit

    (@goferit)


    Title says it all: works on the single product page, should also work on the checkout page when the external product is suggested as a “product you may also like”.

    Checkout is not a good place to give a link to the user to exit the site. Hope this case helps

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Thanks for the suggestion @goferit! The free version of this plugin only modifies the links on single product pages. Shop pages, categories and other product listings (including related products/cross sells), are only covered in the Pro version.
    If you want to prevent customers from exiting your checkout for external products, you may want to disable the suggested products altogether, there’s a tutorial for that on businessbloomer.com

    Additionally/alternatively, if you only want to automatically remove the external products from the cross sells completely, you can do that with the following code snippet:

    
    add_filter('woocommerce_cart_crosssell_ids',function($cross_sells,$cart){
    	foreach ($cross_sells as $key => $product_id) {
    		if ($product = wc_get_product($product_id)) {
    			// remove if external
    			if ( $product->is_type( 'external' ) ) {
    				unset($cross_sells[$key]);
    			}
    		}
    		return $cross_sells;
    	}
    }, 10, 2 );
    

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Hope that helps, let us know if you have any further questions!

Viewing 1 replies (of 1 total)
  • The topic ‘Enable on Checkout Cross-sells’ is closed to new replies.