Home » WooCommerce: Disable PostCode/Zip Field on the Checkout Page

WooCommerce: Disable PostCode/Zip Field on the Checkout Page

by adminkys

In some countries there is no Postcode/ZIP (such as Ireland!). How do we make the Postcode/ZIP field not required, or how do we completely remove it? The answer is very simple.

Remove the Postcode Field on the WooCommerce Checkout Page
Remove the Postcode Field on the WooCommerce Checkout Page

PHP Snippet: Remove Postcode/ZIP Field @ WooCommerce Checkout

/**
* @snippet Remove the Postcode Field on the WooCommerce Checkout
* @how-to Get tutoraspire.com FREE
* @sourcecode https://tutoraspire.com/?p=461
* @author Tutor Aspire
* @testedwith WooCommerce 3.5.1
*/

add_filter( 'woocommerce_checkout_fields' , 'tutoraspire_remove_billing_postcode_checkout' );

function tutoraspire_remove_billing_postcode_checkout( $fields ) {
  unset($fields['billing']['billing_postcode']);
  return $fields;
}

Official Documentation

https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/

You may also like