If you leave a required field empty on a WooCommerce checkout, you get something like this:
"Billing First Name is a required field."
The "Billing" part is there so customers can tell billing errors apart from shipping errors. That makes sense on the default checkout. But a lot of stores I work on have a trimmed-down checkout with no separate shipping address at all, and there the prefix is just noise. Clients notice it too. "Why does it say Billing? There's only one form."
So here's how I get rid of it.
The snippet
Put this in your child theme's functions.php or in a small custom plugin:
function cv_remove_billing_prefix( $error ) {
if ( strpos( $error, 'Billing ' ) !== false ) {
$error = str_replace( 'Billing ', '', $error );
}
return $error;
}
add_filter( 'woocommerce_add_error', 'cv_remove_billing_prefix' );
woocommerce_add_error runs on every error notice before it's shown, so we just look for "Billing " and remove it. Nothing else in the checkout changes.
Before:
Billing First Name is a required field.
After:
First Name is a required field.
A couple of things to watch out for
Translated stores. If the site isn't in English, the prefix won't be "Billing". On a Greek store, for example, you'd need to match whatever your translation uses. Check the actual error message on the front end and use that string.
You might actually need the prefix. If your checkout does have both billing and shipping fields, removing it makes "First Name is a required field" ambiguous. Only do this when there's a single address form.
That's it. It's a tiny change, but checkout is the one page where you really don't want customers squinting at confusing messages.