Created
December 17, 2016 13:45
-
-
Save damiencarbery/cd57f2987c1520773d6879131bc6fbc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does it still work?