Skip to content

Instantly share code, notes, and snippets.

@Pebblo

Pebblo/example.php

Last active Apr 1, 2019
Embed
What would you like to do?
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