I need to block the promotion code usage for tickets without a WP user capability (WP User capability is blank). Only ticket with the “read” capability should allow promo codes.
EE does not have this functionality built in so you’ll need some custom development to do this. One option is to just remove the filter that adds the promo field to the checkout if the tickets from the current cart registrations don’t have the ‘read’ cap.
The promotion add-on uses the FHEE__EE_SPCO_Reg_Step_Payment_Options___display_payment_options__before_payment_options filter hook at priority 10, so you’ll want to hook in at priority 9 or lower to do the above.
We have an example of how you can pull all the registrations from the current session here:
The support post ‘Block promo code usage for tickets without a WP user capability’ 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.