How to Fix Billing Postcode is Not a Valid Postcode / ZIP

How to Fix Billing Postcode is Not a Valid Postcode / ZIP

If you are looking for a quick way to fix this common WooCommerce checkout error – Billing Postcode is not a valid postcode / ZIP, this quick tutorial will show you how you can get rid of this postcode validation.

This error may cause your customers to be frustrated and can lead to a decrease in the conversions of your visitors to customers.

Ideally, you need to make the checkout process smooth for all your customers.

If possible, you need to use a plugin that improves the checkout process.  You need to learn more about how to customize the WooCommerce checkout page to improve the customer experience.

You simply need to know how you can disable postcode validation and it will resolve this error that appears when you try to checkout without having a valid postcode added to your post postal code input field.

Disable Postcode/Zip Validation: Fix Error – Billing Postcode is Not a Valid Postcode / ZIP

The best way to show you how to disable Postcode/Zip Validation is to illustrate with a clear example how this occurs.

As you can see on the screenshot below, I have filled in a Zip/postcode that is not valid and the error has been shown at the top of the checkout page:

disable postcode/zip validation

The solution to fix this issue is to simply remove the validation or remove the postcode/zip field altogether so that your customers can check out without this error occurring.

Option #1) Disable Postcode/ZIP Validation on the WooCommerce Checkout Page

The first option is to disable the validation of the zip/postal code field and we can achieve this using the code snippet below:

 

// Disable the Zip/postcode validation 

add_filter( 'woocommerce_default_address_fields' , 'njengah_disable_postcode_validation' );
 
function njengah_disable_postcode_validation( $address_fields ) {
  $address_fields['postcode']['required'] = false;
  return $address_fields;
}

You should add this code to the functions.php of your theme.

This code will remove the validation but will leave the field so that users can still fill in the zip/postcode they prefer without the error – Billing Postcode is not a valid postcode / ZIP.

Option #2) Disable Postcode/ZIP Validation on the WooCommerce Checkout Page

The second option is to get rid of the zip/postcode field so that users do not have to fill the field and they can simply fill the other fields without this zip/postcode.

You can remove or disable the zip/ post code field using the code snippet below:

 

// Remove the Zip/postcode field 

add_filter( 'woocommerce_checkout_fields' , 'njengah_remove_the_postcode_field' );
 
function njengah_remove_the_postcode_field( $fields ) {
$fields['billing']['billing_postcode']['required'] = false;
$fields['shipping']['shipping_postcode']['required'] = false;
return $fields;
}

This code snippet should be added to the functions.php of your active theme and it will successfully remove the zip/postcode field from your WooCommerce checkout page.

As you can see in the example below, I have added the code snippet in the functions.php of the active theme – Storefront theme and I have successfully disabled the zip/postal code field on the WooCommerce checkout page.

remove zip-postal code woocommerce checkout page

If you are using the Storefront theme and would like to have more customization ideas, I shared the ultimate Storefront theme customization guide that has been helping thousands of my readers to quickly set up their WooCommerce stores and customize any feature they don’t like.

If you would also want to hide anything on your WooCommerce site, I shared a great guide on how to hide WooCommerce features – WooCommerce Hide Guide.

Conclusion

In this post, I have highlighted and illustrated the two ways you can fix the error – Billing Postcode is not a valid postcode / ZIP on your WooCommerce checkout page. You can simply remove the field validation or remove the field so that your customers don’t have to field the field.

If you still want to customize your WooCommerce checkout process further, you can consider using one of our best WooCommerce checkout plugins – WooCommerce redirects after the checkout plugin. You can also hire a WordPress expert to help you customize your WooCommerce store quickly.

Similar Articles