I am in situation where I have to remove all products from cart after user logs in.
I have seen code examples to remove previous cart items, but don't know how to make the cart completely empty after the user logs in. How to remove the old cart product after customer login
The above url is for the logic Customer already have 5 products in cart > Visit the site > add newly 2 products in cart > login customer account > show the cart newly add 2 product (old cart products are removed)
But in my case, When the customer logs in all 7 products has to be removed from cart.
Any suggestions will be appreciated. Thank you.