Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active November 21, 2017 13:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/106393acd850cb83c3798c66a9c5a19a to your computer and use it in GitHub Desktop.
Save Pebblo/106393acd850cb83c3798c66a9c5a19a to your computer and use it in GitHub Desktop.
An example of how to completely hide member only tickets that the user does not have access to. The tickets will be completely removed from the ticket selector on the front end.
<?php
// Do not include the opening php tag if you already have one.
//This function returns and emptry string for tickets that your user account does not have capabilities to view.
function tw_ee_hide_tickets_with_caps() {
return '';
}
add_filter('FHEE__EED_WP_Users_Ticket_Selector__maybe_restrict_ticket_option_by_cap__no_access_msg_html', 'tw_ee_hide_tickets_with_caps' );
@trentsl
Copy link

trentsl commented Mar 13, 2017

This works great.

Here is the thing. I want:

  • people not logged in to see the standard price (non-member)

  • person logged in with member role 1 to see their special price only (no standard price)

  • person logged in with member role 2 to see their special price only (no standard price, no price from member role 1)

How do I hide standard tickets for the user with capabilities. I only want to show their discounted ticket.

@Pebblo
Copy link
Author

Pebblo commented May 15, 2017

Hi trentsl,

Please open a support topic on the forums:

https://eventespresso.com/support/forums/

It sounds like you need something like this snippet: https://gist.github.com/Pebblo/16a7dabb6a6d8f0f3d4370ccda06098b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment