Something that always bugs me when preparing a WooCommerce checkout flow is the error messages when you leave required fields empty. They’ll say something like “Billing First name is a required field.” Look at that ugly capitalization, and not to mention the fact that I’m not using Shipping in many cases since it concerns virtual products, so the term “Billing” is unnecessary.
If you look at the source code, there’s no setting or filter hook to change this text, so I usually resort to this “hacky” method. Filter on the “gettext” filter which all translatable text passes through. Then find the strings we want by looking for “Billing %s”, and optionally the text domain “woocommerce” for more accuracy. You can then return an alternative. Usually “%s” which would in the case of the above example return “First name” since this string will pass through a sprintf function which replaces the %s with the field name.
Striving for originality, usability, simplicity and style — Frique builds jQuery and WordPress plugins and themes that make life a little easier. Frique cares and writes about web and software usability, performance, development workflow and desire for perfection.