0

I have an issue with Woocommerce. Customers add a product (tour booking) to their cart, after which it redirects them to the checkout page straight away. Many of them use the back button to go back to the previous page and try to book again. When they do this, a message pops up that the product cannot be added to the cart because it's already in there.

What I am looking for is a function that replaces the new add to cart or booking with the latest one. Basically avoiding duplicate bookings by just removing the old product from the cart. Is that possible and can that be done with a snippet?

user3354767
  • 203
  • 2
  • 4
  • 14
  • Clear cart before adding product in it -https://stackoverflow.com/questions/49382193/empty-cart-before-add-to-cart-in-woocommerce – Snuffy Jul 04 '23 at 09:23

0 Answers0