• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Change the text “Username or email” in WooCommerce

Learn in this code tutorial how to change the “Username or email” text when you show the login option on the page to checkout with WooCommerce.

setting-WooCommerce-allow-login-user-checkout

If you have enabled the option that allows the user to log in on the checkout page of WooCommerce, you will see that in the first field of the section the text of “Username or email” is displayed.

Default login text checkout WooCommerce
Default login text checkout WooCommerce

But you may want to change it for some reason; for example, if you want to avoid confusion between username and email, or even for a design issue.

This would be an example of changing the text for a custom text:

Custom login text checkout WooCommerce
Custom login text checkout WooCommerce

And here’s how to do it:

Snippet to change WooCommerce “Username or email” text

Add the following code at the end of functions.php or in your functionality plugin:

To see this and another 847 code snippets of this website, login or subscribe here.

In this case you use the gettext filter to modify the default text to “Email”. As always, I invite you to change it to whatever you want.

Conclusion

You can see that with a few lines of code you can modify the text of “Username or email” of WooCommerce for the one you want.

If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.

Benefits of being a subscriber. 🙂

PHP Products WooCommerce

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?