WooCommerce applies default validation on postcode fields during checkout. In most cases, this is helpful — it ensures customers enter a correctly formatted postal code before completing their order. But there are situations where this validation gets in the way.
For example, if your store serves regions where standard postcode formats don’t apply, or if you need customers to enter text-based location identifiers instead of numeric codes, WooCommerce will reject the input and show an error. This blocks the checkout process entirely. In this tutorial, we’ll show you how to remove the postcode validation on the WooCommerce checkout page for both billing and shipping fields using a simple code snippet.
Step 1: Add a Product to Cart and Go to Checkout
To see the issue in action, start by adding any product to your cart. Then click the Proceed to Checkout button to go to the checkout page.

On the checkout page, you’ll notice that WooCommerce requires a valid postal code. If you leave the postcode field empty or enter an invalid format, WooCommerce will display a validation error and prevent the order from being placed.
Step 2: Add the Code to Remove Postcode Validation
To remove the postcode validation from both billing and shipping fields, add the following code to the end of your theme’s functions.php file (use a child theme to keep your changes safe during updates):
add_filter( 'woocommerce_checkout_fields',
'remove_postcode_validation', 99 );
function remove_postcode_validation( $fields ) {
unset(
$fields['billing']['billing_postcode']
['validate']
);
unset(
$fields['shipping']['shipping_postcode']
['validate']
);
return $fields;
}
Once you save the file, the postcode validation will be removed from your checkout page. Customers can now proceed with checkout without needing to enter a valid postcode format.
What This Code Does
The code hooks into the woocommerce_checkout_fields filter, which gives you access to all the checkout form fields before they’re rendered on the page. The function uses unset() to remove the validate property from both the billing postcode and shipping postcode fields.
The priority of 99 ensures that this filter runs after WooCommerce’s own field setup, so the validation rules are already in place by the time our function removes them.
Conclusion
Removing postcode validation in WooCommerce is a quick fix that can save your customers from unnecessary checkout friction — especially if your store operates in regions where standard postal code formats don’t apply. A single snippet in your child theme’s functions.php is all it takes.
Frequently Asked Questions
Will this remove the postcode field completely from checkout?
No. This code only removes the validation rule, not the field itself. The postcode input will still appear on checkout, but customers won’t be blocked by format errors. To remove the field entirely, you’d need to unset the full field array, not just the validate property.
Does this affect only billing, only shipping, or both?
The code removes validation from both billing and shipping postcode fields. If you only want to remove it from one, simply delete the unset line for the field you want to keep validated.
Will this survive WooCommerce or theme updates?
Only if you add the code to a child theme’s functions.php. If you add it to the parent theme’s file, it will be overwritten the next time the theme updates.
Can I use a plugin instead of adding code?
Yes. Checkout field editor plugins like our WooCommerce Checkout & Register Form Editor let you manage field visibility and validation from the admin panel without writing any code.
