Support

Home Forums Event Espresso Premium Changing "Not Approved" to "Pending Approval"

Changing "Not Approved" to "Pending Approval"

Posted: May 31, 2019 at 5:55 pm

Viewing 3 reply threads


Wendy

May 31, 2019 at 5:55 pm

Hello,

I need to change the text that says “Not Approved” when someone completes their registration/application to “Pending Approval”. How do I do this?

Thanks,
Wendy


Josh

  • Support Staff

June 3, 2019 at 7:23 am

Hi Wendy,

You can add the following code to your site that will change the text:

function w_custom_filter_gettext(
    $translated, 
    $original, 
    $domain 
) {
    $strings = array(
        'Not Approved' => 'Pending Approval',
        'not approved' => 'Pending Approval',
        // You can add some more strings here
    );
    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
}
add_filter( 'gettext', 'w_custom_filter_gettext', 10, 3 );

You can add the above to a functions plugin or, if available, into your WordPress child theme’s functions.php file.


Wendy

June 5, 2019 at 6:06 pm

Thanks Josh. That worked! Now, how do I change the following language that shows up on the same page:

Important Notice:
The following Event(s) you have registered for do not require payment at this time and will not be billed for during this transaction. Billing will only occur after all attendees have 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.


Josh

  • Support Staff

June 6, 2019 at 7:32 am

There are two strings that have a similar message, so you probably want to change both. You could add those to the above example function, or instead add new simple functions like these:

add_filter(
    'AHEE__EED_Thank_You_Page__get_ajax_content__not_approved_message',
   function() {
      return 'Your new message goes here';
   }
);
add_filter(
'FHEE__EE_SPCO_Reg_Step_Payment_Options___events_requiring_pre_approval__events_requiring_pre_approval_msg',
   function() {
      return 'Your other new message goes here';
   }
);
Viewing 3 reply threads

The support post ‘Changing "Not Approved" to "Pending Approval"’ 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