Some US states are countries

American Samoa, Guam, Mariana, Puerto Rico and islands are not really
states and have ISO country codes, so should be listed as such.

This may have implications on users using these state codes right now,
but as part of shipping zones this change makes sense. You wouldn’t
ship to Guam for the same cost as the US. @BFTrick
This commit is contained in:
Mike Jolley 2015-12-08 12:39:17 +00:00
parent 485a127778
commit b9a02ba98c
3 changed files with 25 additions and 25 deletions

View File

@ -16,44 +16,44 @@ if ( ! defined( 'ABSPATH' ) ) {
return array(
'AF' => array(
'name' => __( 'Africa', 'woocommerce' ),
'country_codes' => array(
'name' => __( 'Africa', 'woocommerce' ),
'countries' => array(
'AO', 'BF', 'BI', 'BJ', 'BW', 'CD', 'CF', 'CG', 'CI', 'CM', 'CV', 'DJ', 'DZ', 'EG', 'EH', 'ER', 'ET', 'GA', 'GH', 'GM', 'GN', 'GQ', 'GW', 'KE', 'KM', 'LR', 'LS', 'LY', 'MA', 'MG', 'ML', 'MR', 'MU', 'MW', 'MZ', 'NA', 'NE', 'NG', 'RE', 'RW', 'SC', 'SD', 'SH', 'SL', 'SN', 'SO', 'ST', 'SZ', 'TD', 'TG', 'TN', 'TZ', 'UG', 'YT', 'ZA', 'ZM', 'ZW'
)
),
'AN' => array(
'name' => __( 'Antarctica', 'woocommerce' ),
'country_codes' => array(
'name' => __( 'Antarctica', 'woocommerce' ),
'countries' => array(
'AQ', 'BV', 'GS', 'HM', 'TF'
)
),
'AS' => array(
'name' => __( 'Asia', 'woocommerce' ),
'country_codes' => array(
'AE', 'AF', 'AM', 'AP', 'AZ', 'BD', 'BH', 'BN', 'BT', 'CC', 'CN', 'CX', 'CY', 'GE', 'HK', 'ID', 'IL', 'IN', 'IO', 'IQ', 'IR', 'JO', 'JP', 'KG', 'KH', 'KP', 'KR', 'KW', 'KZ', 'LA', 'LB', 'LK', 'MM', 'MN', 'MO', 'MV', 'MY', 'NP', 'OM', 'PH', 'PK', 'PS', 'QA', 'SA', 'SG', 'SY', 'TH', 'TJ', 'TL', 'TM', 'TW', 'UZ', 'VN', 'YE'
'name' => __( 'Asia', 'woocommerce' ),
'countries' => array(
'AE', 'AF', 'AM', 'AZ', 'BD', 'BH', 'BN', 'BT', 'CC', 'CN', 'CX', 'CY', 'GE', 'HK', 'ID', 'IL', 'IN', 'IO', 'IQ', 'IR', 'JO', 'JP', 'KG', 'KH', 'KP', 'KR', 'KW', 'KZ', 'LA', 'LB', 'LK', 'MM', 'MN', 'MO', 'MV', 'MY', 'NP', 'OM', 'PH', 'PK', 'PS', 'QA', 'SA', 'SG', 'SY', 'TH', 'TJ', 'TL', 'TM', 'TW', 'UZ', 'VN', 'YE'
)
),
'EU' => array(
'name' => __( 'Europe', 'woocommerce' ),
'country_codes' => array(
'AD', 'AL', 'AT', 'AX', 'BA', 'BE', 'BG', 'BY', 'CH', 'CZ', 'DE', 'DK', 'EE', 'ES', 'EU', 'FI', 'FO', 'FR', 'FX', 'GB', 'GG', 'GI', 'GR', 'HR', 'HU', 'IE', 'IM', 'IS', 'IT', 'JE', 'LI', 'LT', 'LU', 'LV', 'MC', 'MD', 'ME', 'MK', 'MT', 'NL', 'NO', 'PL', 'PT', 'RO', 'RS', 'RU', 'SE', 'SI', 'SJ', 'SK', 'SM', 'TR', 'UA', 'VA'
'name' => __( 'Europe', 'woocommerce' ),
'countries' => array(
'AD', 'AL', 'AT', 'AX', 'BA', 'BE', 'BG', 'BY', 'CH', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FO', 'FR', 'GB', 'GG', 'GI', 'GR', 'HR', 'HU', 'IE', 'IM', 'IS', 'IT', 'JE', 'LI', 'LT', 'LU', 'LV', 'MC', 'MD', 'ME', 'MK', 'MT', 'NL', 'NO', 'PL', 'PT', 'RO', 'RS', 'RU', 'SE', 'SI', 'SJ', 'SK', 'SM', 'TR', 'UA', 'VA'
)
),
'NA' => array(
'name' => __( 'North America', 'woocommerce' ),
'country_codes' => array(
'name' => __( 'North America', 'woocommerce' ),
'countries' => array(
'AG', 'AI', 'AN', 'AW', 'BB', 'BL', 'BM', 'BS', 'BZ', 'CA', 'CR', 'CU', 'DM', 'DO', 'GD', 'GL', 'GP', 'GT', 'HN', 'HT', 'JM', 'KN', 'KY', 'LC', 'MF', 'MQ', 'MS', 'MX', 'NI', 'PA', 'PM', 'PR', 'SV', 'TC', 'TT', 'US', 'VC', 'VG', 'VI'
)
),
'OC' => array(
'name' => __( 'Oceania', 'woocommerce' ),
'country_codes' => array(
'name' => __( 'Oceania', 'woocommerce' ),
'countries' => array(
'AS', 'AU', 'CK', 'FJ', 'FM', 'GU', 'KI', 'MH', 'MP', 'NC', 'NF', 'NR', 'NU', 'NZ', 'PF', 'PG', 'PN', 'PW', 'SB', 'TK', 'TO', 'TV', 'UM', 'VU', 'WF', 'WS'
)
),
'SA' => array(
'name' => __( 'South America', 'woocommerce' ),
'country_codes' => array(
'name' => __( 'South America', 'woocommerce' ),
'countries' => array(
'AR', 'BO', 'BR', 'CL', 'CO', 'EC', 'FK', 'GF', 'GY', 'PE', 'PY', 'SR', 'UY', 'VE'
)
)

View File

@ -7,11 +7,11 @@
* @author WooThemes
* @category i18n
* @package WooCommerce/i18n
* @version 2.2.0
* @version 2.5.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
return array(
@ -19,6 +19,7 @@ return array(
'AX' => __( 'Åland Islands', 'woocommerce' ),
'AL' => __( 'Albania', 'woocommerce' ),
'DZ' => __( 'Algeria', 'woocommerce' ),
'AS' => __( 'American Samoa', 'woocommerce' ),
'AD' => __( 'Andorra', 'woocommerce' ),
'AO' => __( 'Angola', 'woocommerce' ),
'AI' => __( 'Anguilla', 'woocommerce' ),
@ -104,6 +105,7 @@ return array(
'GL' => __( 'Greenland', 'woocommerce' ),
'GD' => __( 'Grenada', 'woocommerce' ),
'GP' => __( 'Guadeloupe', 'woocommerce' ),
'GU' => __( 'Guam', 'woocommerce' ),
'GT' => __( 'Guatemala', 'woocommerce' ),
'GG' => __( 'Guernsey', 'woocommerce' ),
'GN' => __( 'Guinea', 'woocommerce' ),
@ -177,6 +179,7 @@ return array(
'NG' => __( 'Nigeria', 'woocommerce' ),
'NU' => __( 'Niue', 'woocommerce' ),
'NF' => __( 'Norfolk Island', 'woocommerce' ),
'MP' => __( 'Northern Mariana Islands', 'woocommerce' ),
'KP' => __( 'North Korea', 'woocommerce' ),
'NO' => __( 'Norway', 'woocommerce' ),
'OM' => __( 'Oman', 'woocommerce' ),
@ -190,6 +193,7 @@ return array(
'PN' => __( 'Pitcairn', 'woocommerce' ),
'PL' => __( 'Poland', 'woocommerce' ),
'PT' => __( 'Portugal', 'woocommerce' ),
'PR' => __( 'Puerto Rico', 'woocommerce' ),
'QA' => __( 'Qatar', 'woocommerce' ),
'RE' => __( 'Reunion', 'woocommerce' ),
'RO' => __( 'Romania', 'woocommerce' ),
@ -247,6 +251,8 @@ return array(
'AE' => __( 'United Arab Emirates', 'woocommerce' ),
'GB' => __( 'United Kingdom (UK)', 'woocommerce' ),
'US' => __( 'United States (US)', 'woocommerce' ),
'UM' => __( 'United States (US) Minor Outlying Islands', 'woocommerce' ),
'VI' => __( 'United States (US) Virgin Islands', 'woocommerce' ),
'UY' => __( 'Uruguay', 'woocommerce' ),
'UZ' => __( 'Uzbekistan', 'woocommerce' ),
'VU' => __( 'Vanuatu', 'woocommerce' ),

View File

@ -63,11 +63,5 @@ $states['US'] = array(
'WY' => __( 'Wyoming', 'woocommerce' ),
'AA' => __( 'Armed Forces (AA)', 'woocommerce' ),
'AE' => __( 'Armed Forces (AE)', 'woocommerce' ),
'AP' => __( 'Armed Forces (AP)', 'woocommerce' ),
'AS' => __( 'American Samoa', 'woocommerce' ),
'GU' => __( 'Guam', 'woocommerce' ),
'MP' => __( 'Northern Mariana Islands', 'woocommerce' ),
'PR' => __( 'Puerto Rico', 'woocommerce' ),
'UM' => __( 'US Minor Outlying Islands', 'woocommerce' ),
'VI' => __( 'US Virgin Islands', 'woocommerce' ),
'AP' => __( 'Armed Forces (AP)', 'woocommerce' )
);