Posted: November 19, 2018 at 9:07 pm
However, I’m unclear on one thing: how does the system know which capability is the one that allows both user roles to buy a single ticket?
Note: our user roles are also PM Pro members.
We have User Role Editor installed. I’ve tried to edit a role that can currently buy one type of ticket. I look for EE capabilities in the User Role Editor admin screen, and they are all back-end, admin stuff, like editing or deleting events, and so on.
Where is the capability that allows a role to buy a ticket? What is it called? Does it have an ID name?
I can add a capability in User Role Editor, but it only asks me to name the ID. Now, I can make something up, like “buy_member_2_ticket” or whatever. But then, how does it ‘know’ what that name means?
And it seems like the capability needs to be coded in. But I’m thinking – doesn’t one exist already? And where is it? What is it called? Can I enter an existing one built into EE4?
Adding additional roles or capabilities to a single user’s profile doesn’t do the trick here (tried it). We are willing to go this route, which is more manual, but the ticket list seems to only ‘understand’ the user’s primary role when they log in to buy a certain ticket.
Hope I’m making sense…
Thank you for your help.
For extra context:
We are using PM Pro.
We want pmpro_role_6 and pmpro_role_7 to be allowed to be pmpro_role_1 tickets.
Here is a sample page (if you need it): https://www.bcplaytherapy.ca/events/introduction-play-therapy-6ceus/
Sounds like there is some confusion over roles vs capabilies, I’ll run through your questions and then explain further afterwards.
You would use a capability that has been set on both roles you want to purchase the ticket, a role just is a collection of capabilities, without those capabilities, the role doesn’t/shouldn’t mean much.
For example, I could set you up and account on my site with the Administrator, but if I remove all but the ‘read’ capability from your account, you role may well be ‘Administrator’ but your capabilities only allow you to do what a subscriber can do… read.
To allow EE to work with the majority of Member plugins we use capabilities, your problem (iirc) right now is PMP is a little different and you may need one of their add-ons for it to function with capabilities.
There isn’t one by default, you set whichever capability you want to use based on your setup and it’s different is you are using a membership plugin vs just standard WP accounts.
My apologies, but I’m not sure what this means.
Which ‘name’? Can you add a screenshot of what you are looking at?
Generally, additional capabilities do NOT need to be coded for this to work but it does depends on how your roles are set up. EE does not add (nor does it need to) a capability specifically for purchasing a ticket.
What doesn’t work? What steps did you try?
EE doesn’t care about the ‘role’, you should not be setting the users role in the capability field, it checks for capabilities on the users account, not what ‘role’ they have.
Having said that, it gets a little confusing because at one point WordPress DID use allow you to check for a role as a capability, but its not how it should be done and they now discourage it, so setting the role within the capability will actually most likely work but not with multiple roles.
It’s been a little since I last used PMP (I’ll install it now and refresh) but it needs to ‘stack’ capabilites for that to work, ie:
For example pmpro_role_6 needs to have capabilityes A,B,C
Then pmpro_role_7 has A,B,C + its own capabilites (meaning it has the same access as role_6 + the capsabilites for whatever role_7 can do.
The support post ‘One ticket, two roles, need to know the role ID’ 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.