How to change “Registration complete. Please check your e-mail.” message in wp-login.php

You can use this filter to change the default “Registration complete. Please check your e-mail.” message on wordpress.

add_filter( 'wp_login_errors', 'override_reg_complete_msg', 10, 2 );
function override_reg_complete_msg( $errors, $redirect_to ) {
   if( isset( $errors->errors['registered'] ) ) {
     $needle = __('Registration complete. Please check your e-mail.');
     foreach( $errors->errors['registered'] as $index => $msg ) {
       if( $msg === $needle ) {
         $errors->errors['registered'][$index] = 'Your new message here';
       }
     }
   }

   return $errors;
}

Thanks DaveRoss

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply