Eircode
-
Woocommerce has now made Eircodes a mandatory field in the checkout process. Eircodes are Ireland’s version of a Zip code or a UK post code.
Unfortunately most Irish people don’t know their Eircode so and even thought the form shows it as optional you cannot proceed to place an order without this.
In a previous forum post it was suggested to add the following code into the themes functions.php file but this did not work for me.
Any thoughts anybody?
add_filter( 'woocommerce_checkout_fields', 'custom_override_default_address_fields' ); function custom_override_default_address_fields($fields){ global $woocommerce; $country = $woocommerce->customer->get_country(); if($country == 'IE'){ $fields['billing']['postcode']['required'] = false; $fields['shipping']['postcode']['required'] = false; } return $fields; }
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Eircode’ is closed to new replies.