Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created July 22, 2016 14:45
Show Gist options
  • Save lorenzocaum/557868dededa4d78c524d6e7dddb4436 to your computer and use it in GitHub Desktop.
Save lorenzocaum/557868dededa4d78c524d6e7dddb4436 to your computer and use it in GitHub Desktop.
How to change the intro messaging at the top of the registration checkout page for Event Espresso 4

Add the sample code below to your child theme's functions.php file or in a site specific plugin. Then change the text after the arrow to something of your choice.

<?php
//* Do NOT include the opening php tag

//* Change the intro in order to messaging in registration checkout
function ee_custom_messaging_registration_checkout_in_order_to( $translated, $original, $domain ) {
    $strings = array(
        'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required.' => 'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required. Enter a name and email for each ticket option',
    );
    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
}
add_filter( 'gettext', 'ee_custom_messaging_registration_checkout_in_order_to', 10, 3 );
@lorenzocaum
Copy link
Author

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment