Support

Home Forums Event Espresso Premium Configurable popup messages [feature request]

Configurable popup messages [feature request]

Posted: February 2, 2015 at 7:45 am

Viewing 1 reply thread


Bryan Aguirre

February 2, 2015 at 7:45 am

Some users are ending registration earlier than they should because of this message:
EE_Error::add_success( __(‘Attendee information submitted successfully.’, ‘event_espresso’ ));
They simply think that they have registered and close the browser.

I have changed this message to:
EE_Error::add_success( __(‘Attendee added. You MUST still choose a payment method and click on FINALIZE REGISTRATION’, ‘event_espresso’ ));

If this (and other messages like it) was configurable I would not need to dig in the code and change this for every release.
Thanks!


Lorenzo Orlando Caum

  • Support Staff

February 2, 2015 at 8:59 am

Hi Bryan,

You can edit that messaging that using a gettext filter. This is because it is wrapped in a textdomain for Event Espresso:

event_espresso

Here is a general example of what a gettext filter looks like:

https://gist.github.com/79b2e8c1acac2a9556f9

Try this sample coding:

//* Replace verbiage on sample ajax messaging for Event Espresso 4
function ee_change_sample_ajax_messaging( $translated, $original, $domain ) {
 
    $strings = array(
        'Attendee information submitted successfully.' => 'Attendee added. You MUST still choose a payment method and click on FINALIZE REGISTRATION.',
    );

    if ( isset( $strings[$original] ) ) {
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_change_sample_ajax_messaging', 10, 3 );

It can be added to your child theme’s functions.php file (do not include the opening php tag) or a site specific plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


Lorenzo

Viewing 1 reply thread

The support post ‘Configurable popup messages [feature request]’ 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