• Resolved Anonymous User 18744739

    (@anonymized-18744739)


    How can I change these error messages?

    Username already exist
    Email already exist

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support sanjuacharya77

    (@sanjuacharya77)

    Hi @vmpro,

    Thanks for writing in. please add the given code snippet in your functions.php file in order to meet your requirements.

    Here is the code:

    add_filter( 'user_registration_response_array',function( $response_array, $form_data, $form_id ){
    	if( is_array($response_array) && !empty($response_array) ) {
    		foreach($response_array as $key => $message ){
    			if('Username already exists.' ===  $response_array[$key]){
    				$response_array[$key] = __('your custom message Username already exists.','user-registration');
    			}
    			if('Email already exists.' ===  $response_array[$key]){
    				$response_array[$key] = __('your custom message Email already exists.','user-registration');
    			}
    		}
    	}
    return $response_array;
    },10,3);

    Let me know whether it helps or not and I will get back to you.

    Best Regards!

    Thread Starter Anonymous User 18744739

    (@anonymized-18744739)

    Worked perfectly.

    Thank you very much!

    Plugin Support sanjuacharya77

    (@sanjuacharya77)

    Hi @vmpro,

    Glad to know that the issue is resolved. ​If you have a moment to spare then we would really appreciate your review of our plugin. Please click on this link https://ww.wp.xz.cn/support/plugin/user-registration/reviews/and share your thoughts about our team and our plugin. We would love to hear from you.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Change error message’ is closed to new replies.