Issue with auto-generated usernames causing backend error when changing password
-
Hello WooCommerce team,
Recently (not sure if from the latest WooCommerce update or earlier), I noticed an issue with automatically generated usernames when customers create an account during checkout.
- When WooCommerce auto-creates the account (based on name/email at checkout), the username is generated with a dot (
.) or similar. - Later, when I go to WordPress backend → Users → Edit user → Change password, it always shows the error message:
“This username is not allowed. Only ‘a-z’, ‘0-9’, ‘-’, ‘_’, and ‘.’ are permitted.”
- However, if I manually create a user from the backend with the exact same username (including dot), there is no problem at all. The account works normally, and I can change the password without error.
This looks like WooCommerce’s account auto-generation logic is producing usernames that are technically valid, but not passing the validation check in the backend when editing.
I have attached screenshots to show: A user auto-created during checkout (fails when editing password): https://drive.google.com/drive/folders/1BC_ozxv9qBIEEiSDysiyPfZRshfBLErl?usp=sharing
Steps to Reproduce:
- Go to WooCommerce → Settings → Accounts & Privacy, enable “Allow customers to create an account during checkout.”
- Go to checkout, enter name and email → let WooCommerce auto-generate the account.
- After order is placed, go to WordPress Admin → Users → Edit that user.
- Try to change the password and save → error appears: “This username is not allowed. Only ‘a-z’, ‘0-9’, ‘-’, ‘_’, and ‘.’ are permitted.”
Expected behavior:
- Username generated by WooCommerce should fully comply with WordPress username rules, and backend should allow password change without errors.
Actual behavior:
- WooCommerce generates usernames that appear valid but are rejected in backend user profile editing.
Steps to Reproduce:
- Go to WooCommerce → Settings → Accounts & Privacy, enable “Allow customers to create an account during checkout.”
- Go to checkout, enter name and email → let WooCommerce auto-generate the account.
- After order is placed, go to WordPress Admin → Users → Edit that user.
- Try to change the password and save → error appears: “This username is not allowed. Only ‘a-z’, ‘0-9’, ‘-’, ‘_’, and ‘.’ are permitted.”
Expected behavior:
- Username generated by WooCommerce should fully comply with WordPress username rules, and backend should allow password change without errors.
Actual behavior:
- WooCommerce generates usernames that appear valid but are rejected in backend user profile editing.
Could you please check if this is a bug in WooCommerce’s user creation/validation process?
Thank you for your help!
The page I need help with: [log in to see the link]
- When WooCommerce auto-creates the account (based on name/email at checkout), the username is generated with a dot (
The topic ‘Issue with auto-generated usernames causing backend error when changing password’ is closed to new replies.