Restrict cart to one download at a time in Easy Digital Downloads

This code snippet will show you how you can restrict the cart to one download at a time in Easy Digital Downloads

A customer on the Easy Digital Downloads forums needed a way to limit their checkout cart to only 1 download at a time.

The following filter will clear the cart right before a download is added via the purchase buttons, meaning only the most recently added download will exist in the cart.

Copy and paste the following filter into your child theme’s functions.php or custom plugin:

Leave a Reply

Your email address will not be published. Required fields are marked *