Last active
August 24, 2017 16:47
-
-
Save joshfeck/1a574f951fea3941ef8bcd3681abbb5c to your computer and use it in GitHub Desktop.
WP User Integration required ticket capability message: Add a custom message that includes a link to log into the website.
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 include the opening php tag, except of course if you're starting with a blank file | |
add_filter( | |
'FHEE__EED_WP_Users_Ticket_Selector__maybe_restrict_ticket_option_by_cap__no_access_msg', | |
'my_custom_no_access_message', | |
10, | |
4 | |
); | |
function my_custom_no_access_message( $content, $tkt, $ticket_price, $tkt_status ) { | |
$url = wp_login_url( get_permalink() ); | |
$content = $tkt->name() . ' becomes available if you log in to your account. '; | |
$content .= 'You can <a href="'. $url .'" title="Log in">log in here</a>.'; | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment