How to remove postcode validation in Woocommerce?

Woocommerce have default validation on postcode fields. Sometimes we may feel the need to remove this validation. Like if we wanted to insert a text info instead woocommerce won’t allow it and will show an error message.

In this tutorial; We will learn how to remove postcode validation on checkout page of woocommerce in billing fields as well as shipping fields.

So, let’s proceed step by step. First of all go to a product page and add a product to cart by clicking on add to cart button.

2015-09-09_1525Click on proceed to checkout to go to the checkout page. On checkout page, you will need to add a valid postal code and if you do not enter a postcode, Woo will give you an error.

Now, we need to remove this validation. To do this add the following lines of code at the end of your theme’s functions.php file:

add_filter( 'woocommerce_checkout_fields' , 'remove_postcode_validation', 99 );

function remove_postcode_validation( $fields ) {

	return $fields;

This code will remove the Postcode validation and You can proceed without it. Thanks

Editorial Staff

ThemeLocation Provides Wordpress & Woocommerce development & Customization services. Have a Project? Contact To discuss

Leave a Reply

Your email address will not be published. Required fields are marked *