Sometimes you need a plugin to achieve a specific need. And sometimes you need a dedicated snippet to change behavior of an add-on for a plugin to make clients wishes come true. This is one of those times.
Which plugin? One Click Upsells by BuildWooFunnels
Which add-on? AeroCheckout
What do we want to achieve? Remove cart content on regular cart/checkout pages IF the customer started the funnel through AeroCheckout page, but hasn’t completed the purchase.
Solution? In the snippet below, courtesy of AeroCheckout developers.
AeroCheckout is an add-on for One Click Upsells plugin that allows you to create beatiful dedicated checkout pages to be used in a funnel. In this particular case, a client wanted to sell a specific product just through this funnel and one checkout page – but on the same domain as their regular WooCommerce store. The problem arised with visitors starting the funnel but never completing their purchase. This led to a product staying in regular cart where they could use a coupon code and other benefits that should not be available to this particular product that was meant to only be purchased through a particular Aerocheckout page.
Below is the snippet you can use to automatically remove a product from AeroCheckout page if the visitors didn’t make a purchase through AeroCheckout page. As an added bonus, it will also remove an order bump created via Order Bump plugin .
The code goes into your functions.php file: