Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active April 1, 2019 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/783dc4f9f43b9780d860112817edfd6d to your computer and use it in GitHub Desktop.
Save Pebblo/783dc4f9f43b9780d860112817edfd6d to your computer and use it in GitHub Desktop.
Example of how to change the ticket 'no access' which allows for HTML/Hyperlinks.
<?php //Please do not add the opening PHP tag if you already have one.
function tw_change_access_message( $original_text, $ticket, $ticket_price, $ticket_status ) {
return sprintf(
'You must login as a member to view the %1$s%2$s%3$s%4$s option. Log-in %6$shere%7$s.',
'<strong>',
$ticket->name(),
$ticket_price,
'</strong>',
$ticket_status,
'<a href="https://www.example.com/your-profile/login/">',
'</a>'
);
}
add_filter('FHEE__EED_WP_Users_Ticket_Selector__maybe_restrict_ticket_option_by_cap__no_access_msg', 'tw_change_access_message', 10, 4);
<?php //Please do not add the opening PHP tag if you already have one.
function tw_change_access_message( $original_text, $ticket, $ticket_price, $ticket_status ) {
return '"<a href="https://www.example.com/your-profile/login/">Click here</a>" to become a member.';
}
add_filter('FHEE__EED_WP_Users_Ticket_Selector__maybe_restrict_ticket_option_by_cap__no_access_msg', 'tw_change_access_message', 10, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment