Support

Home Forums WP User Integration Members and Non Members tickets

Members and Non Members tickets

Posted: March 22, 2018 at 9:40 am


Phil Stott

March 22, 2018 at 9:40 am

Hi

How do I stop members seeing non members ticket option. We have two tickets 1. non members who can register without login and members who log in. I have set the user level for members that work fine non members don’t get the member option. The problem is when members login they see both member and non member option. How do I stop this happening. we have the user add on.

Thanks

Phil


Tony

  • Support Staff

March 22, 2018 at 11:33 am

Hi there,

This snippets should do what you need:

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

It checks if there is no minimum capability set on a ticket and if the user is logged in but NOT administrator, removes the ticket from view.

Note that this will apply to all of your events by default, so a logged in user will not see any tickets on an event if none of them have a capability set on them. The first functions.php example from the above snippet checks for a ‘hide_no_cap_tickets’ custom field set to true before doing the above if you’d like to avoid that.

The support post ‘Members and Non Members 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