Wednesday, September 14, 2022
HomeWordPress DevelopmentChange default error message "This e-mail handle is already in use" when...

Change default error message “This e-mail handle is already in use” when registering a brand new consumer in WordPress utilizing Caldera Kinds


I want to vary the default error message “This e-mail handle is already in use” that WordPress returns when attempting to register a consumer with an e-mail handle that already exists.
I’m utilizing a Caldera Type for the registration course of and the Type ProcessorConsumer Registration“.
I’ve added the next piece of code in capabilities.php

add_filter(‘registration_errors’, ‘filter_registration_errors’);

perform filter_registration_errors($error){

 if ( $error->get_error_messages('email_exists')) {
   
      $error = new WP_Error('email_exists', 'Your e-mail is already registered. Please, sign up by clicking within the Login hyperlink');
 }

}

However I’m nonetheless getting the default message “This e-mail handle is already in use“.

Any clue shall be greater than appreciated.

Thanks!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments