Hi,
We are using the WP user add-on to qualify the attendees for different tickets..
I wanted to know if anybody can give me guidance on changing the message it says on the ticket selector. It seems that by default it says: “XYZ (for $$) is available to members only.”
We would like to change the “is available to members only.” to something that makes more sense to our users, so something like “is only available to registered scholars.”
Any guidance on how to get this done would be greatly appreciated!
– Freddys
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'The %1$s%2$s%3$s%4$s is available to members only. %5$s' => 'The %1$s%2$s%3$s%4$s is only available to registered scholars. %5$s',
// Add some more strings here
);
// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );
The support post ‘WP User – change "is available to members only."’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.