Support

Home Forums Event Espresso Premium We're sorry, but all ticket sales have ended.

We're sorry, but all ticket sales have ended.

Posted: November 13, 2019 at 9:28 am


wsbr

November 13, 2019 at 9:28 am

I’ve tried the functions.php option listed from a couple of years ago and it didn’t update the text. Is there another new way to add additional text to the ticket sales message? Thanks very much.


Josh

  • Support Staff

November 13, 2019 at 9:34 am

Hi,

May I ask what exactly did you try?


wsbr

November 13, 2019 at 9:40 am

In the child theme functions.php I added;

//* 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. Please send an email to example@example.com to be put on the waitlist.' => '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 );
  • This reply was modified 4 years, 5 months ago by  Josh. Reason: fix code formatting and remove personal info


Josh

  • Support Staff

November 13, 2019 at 9:52 am

Hi,

What you have will not work because the original text isn’t in the code above.

You can change the $strings variable from the above to:

$strings = array(
'We\'re sorry, but all ticket sales have ended.'
=>
'We\'re sorry, but all ticket sales have ended. Please send an email to example@example.com to be put on the waitlist.',
);
  • This reply was modified 4 years, 5 months ago by  Josh. Reason: removed personal information


wsbr

November 13, 2019 at 9:56 am

Ahh, right. Too early in the day for me. Worked as expected.

Thank you.


Josh

  • Support Staff

November 13, 2019 at 10:04 am

Wonderful!

I’m going to edit the above replies and remove any personally identifiable information, including the email address just in case any email address harvesting bots happen to find this page.

The support post ‘We're sorry, but all ticket sales have ended.’ 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.

Event Espresso