I wish to use twice the same promotion code on the checkout of an event but I have a restriction of EE4 with the message “Promotion has already been applied on his event”, can I remove this restriction ?
in fact we are building a system where every promotion created belong to only one user. So if he wants to use twice his promotion code on an event he could do it.
So you’re applying the same promotion code multiple times in a single transaction?
The exclusive option sets if a promotion code can be applied with other promotion codes, not the same promotion multiple times. The promotions system is designed to only allow a promotion to be applied once in a single transaction, you can apply multiple promotions (if none are exclusive) but not multiples of the same promotion.
So you’re applying the same promotion code multiple times in a single transaction?
Yes exactly. User can use X times, so if he want use it twice or more for the same transaction he could.
Is it possible ? Maybe by a hook or something ?
I checked earlier to confirm and currently there’s no hook you can use to work around it, the promotions add-on checks for existing promotion line items before adding another, if any of those line items match the current code it will be rejected.
You’ll find this within EED_Promotions.module.php line 796, 797.
However, if you remove that check you’ll also have multiple line items with the same promotion ID which may not work as expected. I have created a feature request ticket for this but if you’d like to add this yourself and create a pull request our developers can review and provide feedback there.
Viewing 4 reply threads
The support post ‘EE4 – Promotion plugin – Use same code twice on the checkout’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.