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 Processor “Consumer 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!