Posted: November 30, 2022 at 7:54 am
I appear to be having an issue with users being able to purchase tickets, or at least the ticket selector populating, for those logged in. I’m not quite sure what I’m doing wrong, but any assistance would be appreciated. |
|
Hi there, What is happening on the ticket selector? What do you have set as the minimum capability requirement on the ticket? |
|
This reply has been marked as private. | |
Also, what do I need to be able to differentiate two roles, one Subscriber and one Student? Which plugin do you typically recommend, if any? |
|
Ah, ok, so you have the ticket capability requirement set to be The capability you set is for the minimum required capability, you use a single cap. So in your example, a subscriber would have the Assuming your Student role is the second one that has
So, the ticket check works on capabilities rather than roles as per the WP guidelines so you would need roles that ‘stack’ capabilities… for example:
Meaning if you set a min cap requirement of say We don’t really recommend any membership plugins as they all work for different needs, but I know S2 Member ‘stack’ caps like above. —– Now, having said the above, the way WordPress checks capabilities does actually allow you to check based on the role, meaning adding ‘subscriber’ as a min cap would allow only the subscriber role to access it…. however, this changed within WordPress core a while back now and it is discouraged, you should check for the caps a role has (a role is simply a collection of capabilities) and may stop working if they change this later. |
|
This reply has been marked as private. | |
Yes, that text is filtered so you can use a custom snippet to change it, something like this: https://gist.github.com/Pebblo/783dc4f9f43b9780d860112817edfd6d |
|
This reply has been marked as private. | |
Here is an example of hiding tickets that do now have a minimum capability set on them for logged in users: https://gist.github.com/Pebblo/16a7dabb6a6d8f0f3d4370ccda06098b Theres 3 different functions in that gist, the first one only does the above is you have a The second does it without checking for that field but will also show ALL tickets for any users with the ‘manage_options’ capability (meaning admins). The last one removes the tickets from view for logged in users, unless the user is a subscriber roles, in which case it displays the standard messages EE normally does. |
|
The support post ‘Issues with 'Read, Edit_Pages' user permissions per 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.