Skip to content

Instantly share code, notes, and snippets.

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 jesseeproductions/11bf9b1b89ae6d200330ee82dc919c92 to your computer and use it in GitHub Desktop.
Save jesseeproductions/11bf9b1b89ae6d200330ee82dc919c92 to your computer and use it in GitHub Desktop.
Change the RSVP Confirmation Message
/**
* Change the RSVP Confirmation Message
*
* @param string $translation The translated text.
* @param string $text The text to translate.
* @param string $domain The domain slug of the translated text.
* @param string $context The option context string.
*
* @return string The translated text or the custom text.
*/
add_filter( 'gettext', 'tribe_change_rsvp_confirmation_msg', 20, 3 );
function tribe_change_rsvp_confirmation_msg( $translation, $text, $domain, $context = "" ) {
if (
$domain != "default" &&
(
strpos( $domain, 'event-' ) !== 0
)
) {
return $translation;
}
$ticket_rsvp_text = array(
// RSVP Confirmation Message
'Your %1$s has been received! Check your email for your %1$s confirmation.' => 'Custom Message',
);
// If we don't have replacement text, bail.
if ( empty( $ticket_rsvp_text[ $text ] ) ) {
return $translation;
}
return $ticket_rsvp_text[ $text ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment