Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created August 29, 2016 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/80a91db92d1d293afeb53e99d8ac6f0b to your computer and use it in GitHub Desktop.
Save lorenzocaum/80a91db92d1d293afeb53e99d8ac6f0b to your computer and use it in GitHub Desktop.
How to change the not approved messaging that is shown during registration checkout

Add the sample code below to your child theme's functions.php file or in a site specific plugin. Then change the REPLACE ME 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_not_approved( $translated, $original, $domain ) {
    $strings = array(
        'The following events do not require payment at this time and will not be billed during this transaction. Billing will only occur after the attendee has been approved by the event organizer. You will be notified when your registration has been processed. If this is a free event, then no billing will occur.' => 'REPLACE ME',
    );
    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_not_approved', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment