Automatically Empty Cart Before Adding New Product in WooCommerce
When selling digital products, booking services, or individual course memberships, you often want only one item in the WooCommerce cart at any time. This hook clears the existing cart before adding a new product.