Support

Home Forums Event Espresso Premium EE3 – Customizing Attention Message text on Thank You Page

EE3 – Customizing Attention Message text on Thank You Page

Posted: March 12, 2015 at 7:06 pm

Viewing 3 reply threads


Renee deVilliers

March 12, 2015 at 7:06 pm

Hi,

I am testing registration after having done a tonne of things to customize notifications etc.

I proceeded through registration and clicked the payment link in my email I received for registering, so that I could view payment details.

We are using both PayPal and Check (I have customized this in Payment Options in the admin area to actually say “In-Person Cash/Cheque or Interac Transfer Payment”

So when I click on that under the Please Choose Payment Option A Message pops open, that is an alert box message and it says:

Attention! If you wish to pay by check or money order, then please make note of the information above, and click to Complete your Registration

I would like to edit this message, because the “cheque or money order” text is not applicable and needs editing.

How can I do this? Please let me know. Thanks


Lorenzo Orlando Caum

  • Support Staff

March 12, 2015 at 7:37 pm

Hi Renee, that messaging is wrapped in a gettext filter:


Similar to the prior gettext filters that were shared, it can be updated using a new gettext filter:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#custom-function


Lorenzo


Renee deVilliers

March 15, 2015 at 12:17 pm

Lorenzo,

I am n php whiz, but I added the following to my custom_functions.php file, but it doesn’t change the text.

function mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'If you wish to pay by check or money order, ' => 'If you wish to pay in-person by cash, cheque or Interac transfer, ',
     
        // 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', 'mycustom_filter_gettext', 10, 3 );

perhaps you can help me if I am doing something wrong.


Dean

March 16, 2015 at 5:28 am

Hi,

The string is:

“If you wish to pay by check or money order, then please make note of the information above, and click to ”

And it needs to be entered exactly.

So your code would be:

function mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'If you wish to pay by check or money order, then please make note of the information above, and click to ' => 'If you wish to pay in-person by cash, cheque or Interac transfer, ',
     
        // 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', 'mycustom_filter_gettext', 10, 3 );
Viewing 3 reply threads

The support post ‘EE3 – Customizing Attention Message text on Thank You Page’ 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