Support

Home Forums Event Espresso Premium Hide unavailable tickets?

Hide unavailable tickets?

Posted: June 14, 2023 at 3:01 pm

Viewing 2 reply threads


Andrea

June 14, 2023 at 3:01 pm

If I restrict a ticket to only a certain role, it gives others this text:

The [event name] is available to members only. On Sale

Is there a way to just hide any tickets that people can’t access? There doesn’t seem to be a unique class to target and I need to have several sets of tickets, which will get messy. I’d really like people to only see the ticket lines that apply to them. But at the very least, I’d want to be able to change the wording so it makes a bit more sense.


Andrea

June 14, 2023 at 3:07 pm

By the way, when I updated the permissions on the ticket, it moved them out of order. I was only able to get them back into order by moving them around, saving, then moving them back into order. So, the source of the events being out of order appears to be using the custom capability function.


Tony

  • Support Staff

June 20, 2023 at 4:19 am

Hi there,

So, it is possible to change the text used by the add-on, we have a filter available for it and you’ll find some examples here:

https://gist.github.com/search?q=FHEE__EED_WP_Users_Ticket_Selector__maybe_restrict_ticket_option_by_cap__no_access_msg

However, it is also possible to remove the tickets users do not have access to using another snippet, for example if I follow what it is you are trying to do, this should work for you:

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

You can add that to a custom functions plugin on the site and we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Viewing 2 reply threads

The support post ‘Hide unavailable tickets?’ 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