Hi,
I have installed a free gift plugin allowing to choose a gift in the cart page if order amount reaches a condition (say > 50 €). My problem is that if the customers goes directly to checkout page he may miss the gift step (in cart page). So I’ve written a small code in my function.php to insert an alert in the checkout page to tell the client to go to cart page to add his gift if cart’s subtotal > 50.
But if the client adds a coupon code and subtotal goes below 50 in checkout page the alert is still here when it should disappear.
So I wonder is there is a way for my function to be triggered by ajax when recalculating the checkout page when the coupon is added ?