Support

Home Forums WP User Integration WP User Integration – allow two different roles to a ticket

WP User Integration – allow two different roles to a ticket

Posted: January 13, 2016 at 4:56 pm

Viewing 5 reply threads


Freddys

January 13, 2016 at 4:56 pm

I am using Event Espresso 4 WP User Integration on my site.

When filling out the Ticket Capability Requirement..one of the tickets I want TWO roles to be able to purchase: “learner” or a “student”.

Is it possible to have TWO roles in there and restrict those tickets to only those two roles?


Josh

  • Support Staff

January 13, 2016 at 5:30 pm

Yes. It turns out that you input a capability into that field. So in this case, you enter a capability that only the learner and student roles have.


Freddys

January 13, 2016 at 5:45 pm

I was inputting this on a ticket: learner, student

and it would only recognize first one, learner. and not allow the student to purchase the ticket.

Any I missing something? I want the person (student this scenario) to be able to buy that ticket as well.


Josh

  • Support Staff

January 13, 2016 at 6:01 pm

It seems like you’re missing that there’s a difference between a role and a capability. You can only enter one capability into the field in the ticket editor, so the capability needs to be shared between the learner and student roles.

You’ll want to remember that you can create custom capabilities, so what you can do in this case is use a role/capability plugin and create a capability like ‘learner_student_buy_tickets’, then assign that capability to the learner role and the student role. Then you set the learner_student_buy_tickets as your required capability in the ticket editor.


Freddys

January 13, 2016 at 6:05 pm

You are correct! I was putting in roles and not capabilities in there. What I find weird is that is is working using the roles.. except it won’t let me specify more than one which is what threw a wrench into my program here.

I’ll play on creating a custom capability, adding it to both roles and seeing if that works from there. I think that should do the trick. 🙂
– Freddys


Josh

  • Support Staff

January 14, 2016 at 9:46 am

Technically a role is a collection of capabilities, so it will accept one role and it will work. Where you’ll run into trouble with using a role there, as you have seen, is you’re limited to one capability there. So the way forward is use one capability that’s shared by the two roles.

Viewing 5 reply threads

The support post ‘WP User Integration – allow two different roles to a 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.

Event Espresso