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) {
	$msg = 'Sorry something went wrong! <a href="';
	$msg .= esc_url( wp_lostpassword_url() );
	$msg .= '">Reset your password?</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