Support

Home Forums Multiple Event Registration Add-on "We're Sorry" message once my event has closed

"We're Sorry" message once my event has closed

Posted: October 1, 2014 at 7:19 am


Laura

October 1, 2014 at 7:19 am

Good morning,

I’ve read through other support posts with this error, but don’t find the answer that works for me.

At the end of my events I use [ESPRESSO_CART_LINK anchor=”Register for this workshop” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”] (“workshop” I adjust to event, class, etc as appropriate), which has been working just fine, until I’m now discovering an error message:

(in a red box, on the registration page, such as http://dariendca.org/event-registration/?ee=1861)

“Attention

We’re sorry. Either an error occurred or the event(s) you were attempting to register for may no longer be open for registration.”

Yet below this red box is the message I expect to see – “We are sorry but registration for this event is now closed. Please contact us if you would like to know if spaces are still available.”

I’m running WordPress 3.8.4, D5 Socialia theme, Event Espresso version 3.1.36.5.P.

Thank you for your help.

: }


Lorenzo Orlando Caum

  • Support Staff

October 1, 2014 at 8:33 am

Hi Heather, the messaging in various areas of Event Espresso can be changed.

Try this in a site specific plugin or your child theme’s functions.php file:

function mycustom_filter_gettext_sold_out_messaging( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'We're sorry. Either an error occurred or the event(s) you were attempting to register for may no longer be open for registration.' => 'We are sorry but registration for this event is now closed. Please contact us if you would like to know if spaces are still available.'
    );
 
    // 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_sold_out_messaging', 10, 3 );


Lorenzo

The support post ‘"We're Sorry" message once my event has closed’ 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