Support

Home Forums Event Espresso Premium Change User Role

Change User Role

Posted: February 27, 2019 at 7:52 am

Viewing 5 reply threads


tcumpston

February 27, 2019 at 7:52 am

I have member only pricing for tickets. Once someone purchases a ticket for a meeting I want to add to the user role. So, for example, their current role is listed as member. After the ticket is purchases I want to add the role of 2019 Attendee. Do you have a hook I can do this with or is it already inside of the WP User Integration Plugin?


Tony

  • Support Staff

February 27, 2019 at 7:58 am

Hi there,

Are you sure you want to use multiple roles and not additional capabilities?

Wordpress doesn’t support multiple roles by default so just check that’s actually what you want to do.


tcumpston

February 27, 2019 at 8:23 am

At this point yes. I have been using WooCommerce to sell tickets and my entire site is setup to allow special privileges based on the role. I am exploring adding capabilities but will wait until after the meeting to make further changes to my site.


Tony

  • Support Staff

February 27, 2019 at 11:29 am

I have been using WooCommerce to sell tickets and my entire site is setup to allow special privileges based on the role

Not roles? That’s a significant and important distinction, depending on how whatever it is that’s checking for the role it may not support multiple roles.

In any case, you can use AHEE__EE_Transaction_Processor__update_transaction_and_registrations_after_checkout_or_payment which is passed the EE_transaction object as its first parameter which I’m assuming you’ll need to confirm which ticket was purchased.


tcumpston

February 27, 2019 at 10:12 pm

That worked. Thanks! Meanwhile, I’ll start working on changing over to adding capabilities.


Tony

  • Support Staff

February 28, 2019 at 2:57 am

Great, I’m glad that worked for you.

Viewing 5 reply threads

The support post ‘Change User Role’ 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.

Event Espresso