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.
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.
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:
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 1097 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. 🙂