Hooks for countries and states. Closes #849.

This commit is contained in:
Mike Jolley 2012-03-26 18:55:30 +01:00
parent 2927a52743
commit fa74010038
2 changed files with 5 additions and 4 deletions

View File

@ -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 */

View File

@ -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