With the changes brought about by Brexit, Woocommerce is currently unable to handle UK regions and their different VAT status for consumer sales. For small business on the Island of Ireland this can be challenging to manage with ecommerce sales on your website.

We are listing below a code snippet that can be added to woocommerce that changes the “States” in Ireland to include the six counties. If you have a country based VAT solution on Woocommerce this will prevent customers in the North of Ireland from being charged UK VAT.

/* Adds Northern Ireland Counties to Ireland Shipping for VAT*/
add_filter( 'woocommerce_states', 'custom_woocommerce_states' );

function custom_woocommerce_states( $states ) {

  $states['IE'] = array(
    'IE1' => 'Antrim',
    'IE2' => 'Armagh',
	'IE3' => 'Carlow',
	'IE4' => 'Cavan',
	'IE5' => 'Clare',
	'IE6' => 'Cork',
	'IE7' => 'Donegal',
    'IE8' => 'Down',
	'IE9' => 'Dublin',
	'IE10' => 'Fermanagh',
	'IE11' => 'Galway',
	'IE12' => 'Kerry',
	'IE13' => 'Kildare',
	'IE14' => 'Kilkenny',
	'IE15' => 'Laois',
	'IE16' => 'Leitrim',
	'IE17' => 'Limerick',
	'IE18' => 'Derry/Londonderry',
	'IE19' => 'Longford',
	'IE20' => 'Louth',
	'IE21' => 'Mayo',
	'IE22' => 'Meath',
	'IE23' => 'Monaghan',
	'IE24' => 'Offaly',
	'IE25' => 'Roscommon',
	'IE26' => 'Sligo',
	'IE27' => 'Tipperary',
	'IE28' => 'Tyrone',
	'IE29' => 'Waterford',
    'IE30' => 'Westmeath',
	'IE31' => 'Wexford',
	'IE32' => 'Wicklow',

  return $states;

This is a developer level adjustment so if implementing please insure that you are comfortable working with child themes or a code snippets plugin, a staging site should always be used to test changes to your website before implementation. We have tested this with the latest version of WordPress 5.8 and Woocommerce and it is currently working. It assumes you are working with the Woocommerce tax section and has not been tested with other 3rd party VAT plugins.

To Add

  1. Go to your staging site.
  2. Find your functions.php file in your child theme.
  3. Add code and save.
  4. Test on staging site.
  5. Repeat procedure on your live site.

If you are unsure on how to do this, we offer updates and maintenance services, you can retain us for managing one off fixes like this or for ongoing site maintenance, to get in touch just contact us here get help.

This code snippet was adapted from an original snippet posted at Woocommerce .