I need to change the default error message "This email address is already in use" that WordPress returns when trying to register a user with an email address that already exists. I am using a Caldera Form for the registration process and the Form Processor "User Registration". I have added the following piece of code in functions.php

add_filter( 'registration_errors', 'filter_registration_errors' );

function filter_registration_errors( $error ) {
    if ( $error->get_error_messages( 'email_exists' ) ) {
        $error = new WP_Error( 'email_exists', 'Your email is already registered. Please, sign in by clicking in the Login link' );
    return $error;

But I am still getting the default message "This email address is already in use".

Any clue will be more than appreciated.

Thank you!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy