Description

Filter used to provide a message on User Registration Addon if the login fails.

Parameters

$msg
(string) Message that displays if the login failed.

Source

wpforms-user-registration/class-user-registration.php

More Information

The wpforms_user_registration_login_error is used to display a message if the login fails for any reason.

Example

/**
 * Login failed.
 *
 * @link    https://wpforms.com/developers/wpforms_user_registration_login_error/
 *
 * @param   string   $msg  Message that displays if login fails.
 * @return  string
 */

function wpf_dev_user_registration_login_error( $msg ) {
 
        // This is the message that would appear in the email
    $msg = __('Sorry something went wrong! ', 'text-domain');
	$msg .= '<a href="'.esc_url( wp_lostpassword_url() ).'">';
	$msg .= __('Would you like to reset your password?', 'text-domain');
	$msg .= '</a>';
 
    return $msg;
}
 
add_filter( 'wpforms_user_registration_login_error', 'wpf_dev_user_registration_login_error', 10, 2 );

Snippet Reference: How to Change Validation Messages for User Registration Addon