Last active
April 1, 2019 13:48
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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