Customer registration/login with email only (no username)
-
I need WooCommerce to only use email address and password for customer registration and login (no username). I have the following code snippet to set customers’ email addresses as usernames:
add_filter( 'woocommerce_new_customer_data', function( $data ) {
$data['user_login'] = $data['user_email'];
return $data;
} );However, the issue then is that on the my-account page, the login form shows “Username or email address” and the error text shows as “ERROR: The username or password you entered is incorrect. Lost your password?” See here:
How can I alter the login form so it instead reads “Email address” and the error as “ERROR: The email address or password you entered is incorrect. Lost your password?” so it would look like this:
Thanks! ??
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Customer registration/login with email only (no username)’ is closed to new replies.