I tried adding this to my function file but it didn’t change the text..

//* Waitlist custom message
function my_waitlist_filter_gettext( $translated, $original, $domain ) {
if( $domain == 'event_espresso' ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'XXSign Up For The Wait List' => 'Join the Wait list', // button text
'XXJoin Now' => 'Wait List Form', // main heading
'XXIf you would like to be added to the wait list for this event, then please enter your name and email address, and we will contact you when spaces become available.XX'
=> 'Please enter your information and we\'ll be in touch.',
'Preferred Option' => 'Preference', // field label
'Join The Wait List' => 'Sign me up', // submit button text
// 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', 'my_waitlist_filter_gettext', 10, 3 );