Learn in this tutorial how to prevent the same product from being added more than once to your Easy Digital Downloads (EDD) cart using code.
If you are using Easy Digital Downloads, in some cases you may want to avoid duplicates in the cart.
For example, in a website where only one product or subscription is sold, perhaps it does not make sense to sell more than one unit of the same product or subscription. This way you avoid possible confusion and returns.
Are you interested? Here’s how:
Snippet to avoid duplicates in the Easy Digital Downloads cart
Add the following code at the end of functions.php or in your functionality plugin:
It’s as simple as that.
This ensures that the user does not add the same product more than once by mistake.
Do you want to avoid duplicates in Easy Digital Downloads cart? Now you know how to do it easily with code.
Any questions? Let me know in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉