Support

Home Forums Event Espresso Premium Members only tickets Reply To: Members only tickets

Reply To: Members only tickets

Author Replies
Tony # Posted on May 9, 2018 at 3:30 pm

Ok, so will the member ticket always be a replacement for the ticket without a capability set on it?

Will logged in users always have access to the member tickets or can they be logged in an not have access to specific member tickets?

I’m asking because you set both tickets to be required and then use this snippet:

https://gist.github.com/Pebblo/16a7dabb6a6d8f0f3d4370ccda06098b#file-functions2-php

Which removes tickets that do not have a capability set on them from view when you are logged in (and not an administrator). So if you have 2 tickets, one without a capability (we’ll callit ‘No cap ticket’) set and another with a capability set (we’ll call that ‘Cap ticket’) logged out users see both tickets, ‘No cap ticket’ will be required, Cap ticket will show the ‘no access’ message (doesn’t matter that its required when you can’t access it). Logged in users will only see the ‘Cap ticket’ as it has a capability set.

The snippet skips this functionality within the admin AND also shows ALL tickets if the user account has the ‘manage_options’ capability (meaning they are an administrator).

Is that what you are looking for?

Do NOT follow this link or you will be banned from the site!