Add the sample code below to your child theme's functions.php file or in a site specific plugin. Then change REPLACE ME to the new messaging that you would like to display to your attendees/registrants.
<?php
//* Do NOT include the opening php tag
//* Change sold out messaging in Event Espresso 4
function ee_custom_sold_out_messaging( $translated, $original, $domain ) {
$strings = array(
'We\'re sorry, but all ticket sales have ended.' => 'REPLACE ME',
);
if ( isset( $strings[$original] ) ) {
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'ee_custom_sold_out_messaging', 10, 3 );
References:
Check out more tutorials for Event Espresso