Description

The wpforms_user_registration_process_login_process_wp_error_message 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/src/Process/Login.php

More Information

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

Example

/**
 * Login failed.
 *
 * @link    https://wpforms.com/developers/wpforms_user_registration_process_login_process_wp_error_message/
 *
 * @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_process_login_process_wp_error_message', 'wpf_dev_user_registration_login_error', 10, 2 );

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