I would like to enable assign a WP User Capability to my WP users when they buy a ticket from a specific event. I have it set up that if they have to register to buy the ticket, then the Capability is set (all purchases must be via a logged-in registered user), however, this does not work for my returning users. Is there a way for me to do this?
My system:
*redacted*
Thanks!
This topic was modified 5 years, 1 month ago by Josh. Reason: removed irrelevant information
Just to note, you may want to add a WP_User instance check to the above, if at some point you run an event that does not require the user to be logged in you’ll get a fatal error as add_cap() will not be available.
Many thanks. I was just able to test this, and it worked like a charm.
Viewing 4 reply threads
The support post ‘How to create a WP User Capability when user purchase a specific ticket?’ 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.