Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Created December 17, 2016 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damiencarbery/cd57f2987c1520773d6879131bc6fbc8 to your computer and use it in GitHub Desktop.
Save damiencarbery/cd57f2987c1520773d6879131bc6fbc8 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Eircode field for Irish addresses
Plugin URI: http://www.damiencarbery.com
Description: Eircode field for Ireland addresses in WooCommerce.
Author: Damien Carbery
Version: $Revision: $
*/
// Small address field changes for Republic of Ireland (IE) - change 'Postcode' to 'Eircode' and 'State / County' to 'County'
add_filter('woocommerce_get_country_locale', 'nc_change_ireland_address_fields');
function nc_change_ireland_address_fields($locale_fields) {
$locale_fields['IE']['postcode']['label'] = 'Eircode'; // Was Postcode
$locale_fields['IE']['state']['label'] = 'County'; // Was 'State / County'
return $locale_fields;
}
@tropicgirlie
Copy link

Does it still work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment