Support

Home Forums Event Espresso Premium How to hide tickets that the current user level cannot select

How to hide tickets that the current user level cannot select

Posted: March 21, 2017 at 12:19 pm

Viewing 6 reply threads


psg_napkin_dev

March 21, 2017 at 12:19 pm

Hey Guys,

I think this is a follow up to this thread: https://eventespresso.com/topic/member-only-tickets-hide-from-generalpublic-view/

I’m trying to hide tickets that are unselectable to the current user role. An example of how the ticket selector works from your documentation – http://ee-screenshots.s3.amazonaws.com/ee4/ee4-s2member-roles-tickets.jpeg

I want to hide the tickets that are “available to members only”.

I’ve tried a CSS solution with no luck.

Thanks in advanced,
Jason


Josh

  • Support Staff

March 21, 2017 at 3:20 pm

Hi Jason,

You can add the following code to a functions file and it will remove those:

https://gist.github.com/joshfeck/41bba9b21e481024e1523b29d529e973


psg_napkin_dev

March 22, 2017 at 8:14 am

Hey Josh,

Amazing as always. Thanks!


psg_napkin_dev

March 22, 2017 at 9:38 am

Hi Josh,

I’m actually having some problems with this. When the S2 Member level is 0, the ticket selector actually hides all tickets. I do have some tickets that are S2 Member level 0 only and those aren’t appearing. This doesn’t happen with any other member level.

Thanks in advanced,

Jason


Josh

  • Support Staff

March 22, 2017 at 10:58 am

Hi Jason,

It sounds like you have an incorrect capability input into the Ticket Capability Requirement field. Do you have read or access_s2member_level0 set for that field?


psg_napkin_dev

March 22, 2017 at 11:08 am

Hey Josh,

Actually just figured it out. I put the incorrect capability input like you said, but I was supposed to put subscriber instead of s2_level_0


Josh

  • Support Staff

March 22, 2017 at 11:56 am

Subscriber is actually a role. You really should be inputting a capability into the Ticket Capability Requirement field, which will help avoid unintended access to tickets.

So for example, these are capabilities that are assigned to the Subscriber role:
read
access_s2member_level0

Viewing 6 reply threads

The support post ‘How to hide tickets that the current user level cannot select’ 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