WooCommerce Extensions

Hide Address Fields for WooCommerce

How to never hide the address fields for purchase above 100?

add_filter( 'haf_hide_address', 'haf_dont_hide_address' );
function haf_dont_hide_address( $hide_enabled ) {
	return 100 <= WC()->cart->get_cart_contents_total() ? false : $hide_enabled;

How to make the postcode field optional for some country?
You may use the haf_optional_postcode_countries filter. Keep in mind that the built-in WooCommerce postcode validation will not be applied when using the plugin.

Leave a Reply

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