• Resolved maria178

    (@maria178)


    Refer to this image. I inputted an existing email and the error message in the registration is wrong. How can I change “Invalid login details” into “This username or email is already in use”?

    • This topic was modified 2 years, 3 months ago by maria178.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Muhammad Arslan

    (@wparslan)

    Hey @maria178

    Thanks for contacting us.

    Do note that Login Customizer currently doesn’t have this feature of customizing the register error messages.

    However, you can implement this hook yourself. https://developer.www.ads-software.com/reference/hooks/registration_errors/

    You can also use this piece of code to change the error message as well, Just copy and paste the following in your child theme’s functions.php file

    add_filter('registration_errors', 'filter_registration_errors');
    
    /**
     * Change the Register Error message when an email is already there
     *
     * @param object $error Default error message.
     * @return void $error Customized error message.
     */
    function filter_registration_errors( $error ) {
        if ( $error->get_error_messages( 'email_exists' ) ) {
            $error = new WP_Error( 'email_exists', "Your email is already registered. Thanks!" );
        }
        return $error;
    }

    Let us know if you need any assistance.

Viewing 1 replies (of 1 total)
  • The topic ‘Change Registration Error Message’ is closed to new replies.