From fa74010038282920fa5463903f54e8a5512d528e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 26 Mar 2012 18:55:30 +0100 Subject: [PATCH] Hooks for countries and states. Closes #849. --- classes/class-wc-countries.php | 8 ++++---- readme.txt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/classes/class-wc-countries.php b/classes/class-wc-countries.php index 00d33b260d4..6b94b3bcf31 100644 --- a/classes/class-wc-countries.php +++ b/classes/class-wc-countries.php @@ -21,7 +21,7 @@ class WC_Countries { */ function __construct() { - $this->countries = array( + $this->countries = apply_filters('woocommerce_countries', array( 'AF' => __('Afghanistan', 'woocommerce'), 'AX' => __('Aland Islands', 'woocommerce'), 'AL' => __('Albania', 'woocommerce'), @@ -267,9 +267,9 @@ class WC_Countries { 'YE' => __('Yemen', 'woocommerce'), 'ZM' => __('Zambia', 'woocommerce'), 'ZW' => __('Zimbabwe', 'woocommerce') - ); + )); - $this->states = array( + $this->states = apply_filters('woocommerce_states', array( 'AU' => array( 'ACT' => __('Australian Capital Territory', 'woocommerce') , 'NSW' => __('New South Wales', 'woocommerce') , @@ -408,7 +408,7 @@ class WC_Countries { 'AP' => __('Pacific', 'woocommerce') ), 'VN' => array() - ); + )); } /** get base country */ diff --git a/readme.txt b/readme.txt index 8d48b83449b..60d493cd905 100644 --- a/readme.txt +++ b/readme.txt @@ -166,6 +166,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Optimised price filter query (Thanks Lucas Stark) * Tweak - woocommerce_attribute_label filter * Tweak - When mix and max price are the same, don't show price filter +* Tweak - Hooks for countries and states * Fix - Search/filter compatibility with relevanssi * Fix - After tax coupons for categories * Fix - Multiple variation image upload