WooCommerce Stripe Payment Gateway - Version 5.1.0

Version Description

  • 2021-04-07 =

  • Fix - Don't attempt to submit level 3 data for non-US merchants.

  • Fix - Hide Payment Request Buttons when guest checkout is disabled.

  • Fix - Match Payment Request states with WooCommerce states.

See changelog for all versions.

Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Stripe Payment Gateway
Version 5.1.0
Comparing to
See all releases

Code changes from version 5.0.0 to 5.1.0

changelog.txt CHANGED
@@ -1,4 +1,9 @@
1
  *** Changelog ***
 
 
 
 
 
2
  = 5.0.0 - 2021-03-17 =
3
  * Add - Display time of last Stripe webhook in settings.
4
  * Add - wc_stripe_webhook_validate_user_agent filter to customize webhook user-agent validation.
1
  *** Changelog ***
2
+ = 5.1.0 - 2021-04-07 =
3
+ * Fix - Don't attempt to submit level 3 data for non-US merchants.
4
+ * Fix - Hide Payment Request Buttons when guest checkout is disabled.
5
+ * Fix - Match Payment Request states with WooCommerce states.
6
+
7
  = 5.0.0 - 2021-03-17 =
8
  * Add - Display time of last Stripe webhook in settings.
9
  * Add - wc_stripe_webhook_validate_user_agent filter to customize webhook user-agent validation.
includes/class-wc-stripe-api.php CHANGED
@@ -187,7 +187,7 @@ class WC_Stripe_API {
187
  * the payment to go through.
188
  *
189
  * @since 4.3.2
190
- * @version 4.3.2
191
  *
192
  * @param array $request Array with request parameters.
193
  * @param string $api The API path for the request.
@@ -197,17 +197,17 @@ class WC_Stripe_API {
197
  * @return stdClass|array The response
198
  */
199
  public static function request_with_level3_data( $request, $api, $level3_data, $order ) {
200
- // Do not add level3 data it's the array is empty.
201
- if ( empty( $level3_data ) ) {
202
- return self::request(
203
- $request,
204
- $api
205
- );
206
- }
207
-
208
- // If there's a transient indicating that level3 data was not accepted by
209
- // Stripe in the past for this account, do not try to add level3 data.
210
- if ( get_transient( 'wc_stripe_level3_not_allowed' ) ) {
211
  return self::request(
212
  $request,
213
  $api
187
  * the payment to go through.
188
  *
189
  * @since 4.3.2
190
+ * @version 5.1.0
191
  *
192
  * @param array $request Array with request parameters.
193
  * @param string $api The API path for the request.
197
  * @return stdClass|array The response
198
  */
199
  public static function request_with_level3_data( $request, $api, $level3_data, $order ) {
200
+ // 1. Do not add level3 data if the array is empty.
201
+ // 2. Do not add level3 data if there's a transient indicating that level3 was
202
+ // not accepted by Stripe in the past for this account.
203
+ // 3. Do not try to add level3 data if merchant is not based in the US.
204
+ // https://stripe.com/docs/level3#level-iii-usage-requirements
205
+ // (Needs to be authenticated with a level3 gated account to see above docs).
206
+ if (
207
+ empty( $level3_data ) ||
208
+ get_transient( 'wc_stripe_level3_not_allowed' ) ||
209
+ 'US' !== WC()->countries->get_base_country()
210
+ ) {
211
  return self::request(
212
  $request,
213
  $api
includes/class-wc-stripe-apple-pay-registration.php CHANGED
@@ -119,7 +119,7 @@ class WC_Stripe_Apple_Pay_Registration {
119
  * with the file from the plugin directory.
120
  *
121
  * @since 4.9.0
122
- * @return bool Wether file is up to date or not.
123
  */
124
  private function verify_hosted_domain_association_file_is_up_to_date() {
125
  // Contents of domain association file from plugin dir.
119
  * with the file from the plugin directory.
120
  *
121
  * @since 4.9.0
122
+ * @return bool Whether file is up to date or not.
123
  */
124
  private function verify_hosted_domain_association_file_is_up_to_date() {
125
  // Contents of domain association file from plugin dir.
includes/constants/class-wc-stripe-payment-request-button-states.php ADDED
@@ -0,0 +1,1160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_Stripe_Payment_Request_Button_States
4
+ *
5
+ * Provides a map between WC states and Payment Request API states.
6
+ * The list is based on libaddressinput: https://github.com/google/libaddressinput,
7
+ * which is used by Chromium based browsers in the native Payment Request address dialog.
8
+ *
9
+ * @since 5.1.0
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit; // Exit if accessed directly.
14
+ }
15
+
16
+ /**
17
+ * Known issues/inconsistencies:
18
+ * 1. WC provides a dropdown list of states, but there's no state field in Chrome for the following countries:
19
+ * AO (Angola), BD (Bangladesh), BG (Bulgaria), BJ (Benin), BO (Bolivia), DO (Dominican Republic),
20
+ * DZ (Algeria), GH (Ghana), GT (Guatemala), HU (Hungary), KE (Kenya), LA (Laos),
21
+ * LR (Liberia), MD (Moldova), NA (Namibia), NP (Nepal), PK (Pakistan),
22
+ * PY (Paraguay), RO (Romania), TZ (Tanzania), UG (Uganda), UM (United States Minor Outlying Islands),
23
+ * ZA (South Africa), ZM (Zambia).
24
+ * 2. Chrome does not provide a dropdown list of states for 161 countries in total, out of the 249 countries WC supports,
25
+ * so the countries in which the state field is required by WC, and not provided by the browser are not supported.
26
+ * 3. Chrome does not provide a zip/postal code field for 60 out of the 249 countries WC supports. Only for 5 countries
27
+ * the zip code field is missing while the state field is present: BS (Bahamas), PA (Panama), SC (Seychelles),
28
+ * SR (Suriname), TV (Tuvalu). Several other countries provide an optional zip code field.
29
+ * 4. WC expects it, but there's no city field in the Payment Request API for the following:
30
+ * JP (Japan), MO (Macao), TN (Tunisia), KY (Cayman Islands), GI (Gibraltar).
31
+ * 5. The following countries are not listed in WC:
32
+ * AC (Ascension Island), IC (Canary Islands), EA (Ceuta & Melilla), CP (Clipperton Island), DG (Diego Garcia),
33
+ * TA (Tristan da Cunha), XK (Kosovo).
34
+ */
35
+ class WC_Stripe_Payment_Request_Button_States {
36
+ /**
37
+ * A list of states which is compatible with Chromium based browsers for the Payment Request API.
38
+ * If the input comes from Chrome, we will always match with `code`, but if the request comes from
39
+ * Safari or other browsers which don't provide a dropdown list, we can match one of the following:
40
+ * - [0] = code (string)
41
+ * - [1] = name (string)
42
+ * - [2] = localName (string|null)
43
+ */
44
+
45
+ // phpcs:disable
46
+ const STATES = [
47
+ // Afghanistan.
48
+ 'AF' => [],
49
+ // Angola.
50
+ 'AO' => [],
51
+ // Argentina.
52
+ 'AR' => [
53
+ 'C' => [ 'Ciudad Autónoma de Buenos Aires', 'Ciudad Autónoma de Buenos Aires', NULL ],
54
+ 'B' => [ 'Buenos Aires', 'Buenos Aires', NULL ],
55
+ 'K' => [ 'Catamarca', 'Catamarca', NULL ],
56
+ 'H' => [ 'Chaco', 'Chaco', NULL ],
57
+ 'U' => [ 'Chubut', 'Chubut', NULL ],
58
+ 'X' => [ 'Córdoba', 'Córdoba', NULL ],
59
+ 'W' => [ 'Corrientes', 'Corrientes', NULL ],
60
+ 'E' => [ 'Entre Ríos', 'Entre Ríos', NULL ],
61
+ 'P' => [ 'Formosa', 'Formosa', NULL ],
62
+ 'Y' => [ 'Jujuy', 'Jujuy', NULL ],
63
+ 'L' => [ 'La Pampa', 'La Pampa', NULL ],
64
+ 'F' => [ 'La Rioja', 'La Rioja', NULL ],
65
+ 'M' => [ 'Mendoza', 'Mendoza', NULL ],
66
+ 'N' => [ 'Misiones', 'Misiones', NULL ],
67
+ 'Q' => [ 'Neuquén', 'Neuquén', NULL ],
68
+ 'R' => [ 'Río Negro', 'Río Negro', NULL ],
69
+ 'A' => [ 'Salta', 'Salta', NULL ],
70
+ 'J' => [ 'San Juan', 'San Juan', NULL ],
71
+ 'D' => [ 'San Luis', 'San Luis', NULL ],
72
+ 'Z' => [ 'Santa Cruz', 'Santa Cruz', NULL ],
73
+ 'S' => [ 'Santa Fe', 'Santa Fe', NULL ],
74
+ 'G' => [ 'Santiago del Estero', 'Santiago del Estero', NULL ],
75
+ 'V' => [ 'Tierra del Fuego', 'Tierra del Fuego', NULL ],
76
+ 'T' => [ 'Tucumán', 'Tucumán', NULL ],
77
+ ],
78
+ // Austria.
79
+ 'AT' => [],
80
+ // Australia.
81
+ 'AU' =>[
82
+ 'ACT' => [ 'ACT', 'Australian Capital Territory', NULL ],
83
+ 'NSW' => [ 'NSW', 'New South Wales', NULL ],
84
+ 'NT' => [ 'NT', 'Northern Territory', NULL ],
85
+ 'QLD' => [ 'QLD', 'Queensland', NULL ],
86
+ 'SA' => [ 'SA', 'South Australia', NULL ],
87
+ 'TAS' => [ 'TAS', 'Tasmania', NULL ],
88
+ 'VIC' => [ 'VIC', 'Victoria', NULL ],
89
+ 'WA' => [ 'WA', 'Western Australia', NULL ],
90
+ // [ 'JBT', 'Jervis Bay Territory', NULL ],
91
+ ],
92
+ // Aland Islands.
93
+ 'AX' => [],
94
+ // Bangladesh.
95
+ 'BD' => [],
96
+ // Belgium.
97
+ 'BE' => [],
98
+ // Bulgaria.
99
+ 'BG' => [],
100
+ // Bahrain.
101
+ 'BH' => [],
102
+ // Burundi.
103
+ 'BI' => [],
104
+ // Benin.
105
+ 'BJ' => [],
106
+ // Bolivia.
107
+ 'BO' => [],
108
+ // Brazil.
109
+ 'BR' => [
110
+ 'AC' => [ 'AC', 'Acre', NULL ],
111
+ 'AL' => [ 'AL', 'Alagoas', NULL ],
112
+ 'AP' => [ 'AP', 'Amapá', NULL ],
113
+ 'AM' => [ 'AM', 'Amazonas', NULL ],
114
+ 'BA' => [ 'BA', 'Bahia', NULL ],
115
+ 'CE' => [ 'CE', 'Ceará', NULL ],
116
+ 'DF' => [ 'DF', 'Distrito Federal', NULL ],
117
+ 'ES' => [ 'ES', 'Espírito Santo', NULL ],
118
+ 'GO' => [ 'GO', 'Goiás', NULL ],
119
+ 'MA' => [ 'MA', 'Maranhão', NULL ],
120
+ 'MT' => [ 'MT', 'Mato Grosso', NULL ],
121
+ 'MS' => [ 'MS', 'Mato Grosso do Sul', NULL ],
122
+ 'MG' => [ 'MG', 'Minas Gerais', NULL ],
123
+ 'PA' => [ 'PA', 'Pará', NULL ],
124
+ 'PB' => [ 'PB', 'Paraíba', NULL ],
125
+ 'PR' => [ 'PR', 'Paraná', NULL ],
126
+ 'PE' => [ 'PE', 'Pernambuco', NULL ],
127
+ 'PI' => [ 'PI', 'Piauí', NULL ],
128
+ 'RJ' => [ 'RJ', 'Rio de Janeiro', NULL ],
129
+ 'RN' => [ 'RN', 'Rio Grande do Norte', NULL ],
130
+ 'RS' => [ 'RS', 'Rio Grande do Sul', NULL ],
131
+ 'RO' => [ 'RO', 'Rondônia', NULL ],
132
+ 'RR' => [ 'RR', 'Roraima', NULL ],
133
+ 'SC' => [ 'SC', 'Santa Catarina', NULL ],
134
+ 'SP' => [ 'SP', 'São Paulo', NULL ],
135
+ 'SE' => [ 'SE', 'Sergipe', NULL ],
136
+ 'TO' => [ 'TO', 'Tocantins', NULL ],
137
+ ],
138
+ // Canada.
139
+ 'CA' => [
140
+ 'AB' => [ 'AB', 'Alberta', 'Alberta' ],
141
+ 'BC' => [ 'BC', 'British Columbia', 'Colombie-Britannique' ],
142
+ 'MB' => [ 'MB', 'Manitoba', 'Manitoba' ],
143
+ 'NB' => [ 'NB', 'New Brunswick', 'Nouveau-Brunswick' ],
144
+ 'NL' => [ 'NL', 'Newfoundland and Labrador', 'Terre-Neuve-et-Labrador' ],
145
+ 'NT' => [ 'NT', 'Northwest Territories', 'Territoires du Nord-Ouest' ],
146
+ 'NS' => [ 'NS', 'Nova Scotia', 'Nouvelle-Écosse' ],
147
+ 'NU' => [ 'NU', 'Nunavut', 'Nunavut' ],
148
+ 'ON' => [ 'ON', 'Ontario', 'Ontario' ],
149
+ 'PE' => [ 'PE', 'Prince Edward Island', 'Île-du-Prince-Édouard' ],
150
+ 'QC' => [ 'QC', 'Quebec', 'Québec' ],
151
+ 'SK' => [ 'SK', 'Saskatchewan', 'Saskatchewan' ],
152
+ 'YT' => [ 'YT', 'Yukon', 'Yukon' ],
153
+ ],
154
+ // Switzerland.
155
+ 'CH' => [],
156
+ // China.
157
+ 'CN' => [
158
+ 'CN1' => [ 'Yunnan Sheng', 'Yunnan Sheng', '云南省' ],
159
+ 'CN2' => [ 'Beijing Shi', 'Beijing Shi', '北京市' ],
160
+ 'CN3' => [ 'Tianjin Shi', 'Tianjin Shi', '天津市' ],
161
+ 'CN4' => [ 'Hebei Sheng', 'Hebei Sheng', '河北省' ],
162
+ 'CN5' => [ 'Shanxi Sheng', 'Shanxi Sheng', '山西省' ],
163
+ 'CN6' => [ 'Neimenggu Zizhiqu', 'Neimenggu Zizhiqu', '内蒙古' ],
164
+ 'CN7' => [ 'Liaoning Sheng', 'Liaoning Sheng', '辽宁省' ],
165
+ 'CN8' => [ 'Jilin Sheng', 'Jilin Sheng', '吉林省' ],
166
+ 'CN9' => [ 'Heilongjiang Sheng', 'Heilongjiang Sheng', '黑龙江省' ],
167
+ 'CN10' => [ 'Shanghai Shi', 'Shanghai Shi', '上海市' ],
168
+ 'CN11' => [ 'Jiangsu Sheng', 'Jiangsu Sheng', '江苏省' ],
169
+ 'CN12' => [ 'Zhejiang Sheng', 'Zhejiang Sheng', '浙江省' ],
170
+ 'CN13' => [ 'Anhui Sheng', 'Anhui Sheng', '安徽省' ],
171
+ 'CN14' => [ 'Fujian Sheng', 'Fujian Sheng', '福建省' ],
172
+ 'CN15' => [ 'Jiangxi Sheng', 'Jiangxi Sheng', '江西省' ],
173
+ 'CN16' => [ 'Shandong Sheng', 'Shandong Sheng', '山东省' ],
174
+ 'CN17' => [ 'Henan Sheng', 'Henan Sheng', '河南省' ],
175
+ 'CN18' => [ 'Hubei Sheng', 'Hubei Sheng', '湖北省' ],
176
+ 'CN19' => [ 'Hunan Sheng', 'Hunan Sheng', '湖南省' ],
177
+ 'CN20' => [ 'Guangdong Sheng', 'Guangdong Sheng', '广东省' ],
178
+ 'CN21' => [ 'Guangxi Zhuangzuzizhiqu', 'Guangxi Zhuangzuzizhiqu', '广西' ],
179
+ 'CN22' => [ 'Hainan Sheng', 'Hainan Sheng', '海南省' ],
180
+ 'CN23' => [ 'Chongqing Shi', 'Chongqing Shi', '重庆市' ],
181
+ 'CN24' => [ 'Sichuan Sheng', 'Sichuan Sheng', '四川省' ],
182
+ 'CN25' => [ 'Guizhou Sheng', 'Guizhou Sheng', '贵州省' ],
183
+ 'CN26' => [ 'Shaanxi Sheng', 'Shaanxi Sheng', '陕西省' ],
184
+ 'CN27' => [ 'Gansu Sheng', 'Gansu Sheng', '甘肃省' ],
185
+ 'CN28' => [ 'Qinghai Sheng', 'Qinghai Sheng', '青海省' ],
186
+ 'CN29' => [ 'Ningxia Huizuzizhiqu', 'Ningxia Huizuzizhiqu', '宁夏' ],
187
+ 'CN30' => [ 'Macau', 'Macau', '澳门' ],
188
+ 'CN31' => [ 'Xizang Zizhiqu', 'Xizang Zizhiqu', '西藏' ],
189
+ 'CN32' => [ 'Xinjiang Weiwuerzizhiqu', 'Xinjiang Weiwuerzizhiqu', '新疆' ],
190
+ // [ 'Taiwan', 'Taiwan', '台湾' ],
191
+ // [ 'Hong Kong', 'Hong Kong', '香港' ],
192
+ ],
193
+ // Czech Republic.
194
+ 'CZ' => [],
195
+ // Germany.
196
+ 'DE' => [],
197
+ // Denmark.
198
+ 'DK' => [],
199
+ // Dominican Republic.
200
+ 'DO' => [],
201
+ // Algeria.
202
+ 'DZ' => [],
203
+ // Estonia.
204
+ 'EE' => [],
205
+ // Egypt.
206
+ 'EG' => [
207
+ 'EGALX' => [ 'Alexandria Governorate', 'Alexandria Governorate', 'الإسكندرية' ],
208
+ 'EGASN' => [ 'Aswan Governorate', 'Aswan Governorate', 'أسوان' ],
209
+ 'EGAST' => [ 'Asyut Governorate', 'Asyut Governorate', 'أسيوط' ],
210
+ 'EGBA' => [ 'Red Sea Governorate', 'Red Sea Governorate', 'البحر الأحمر' ],
211
+ 'EGBH' => [ 'El Beheira Governorate', 'El Beheira Governorate', 'البحيرة' ],
212
+ 'EGBNS' => [ 'Beni Suef Governorate', 'Beni Suef Governorate', 'بني سويف' ],
213
+ 'EGC' => [ 'Cairo Governorate', 'Cairo Governorate', 'القاهرة' ],
214
+ 'EGDK' => [ 'Dakahlia Governorate', 'Dakahlia Governorate', 'الدقهلية' ],
215
+ 'EGDT' => [ 'Damietta Governorate', 'Damietta Governorate', 'دمياط' ],
216
+ 'EGFYM' => [ 'Faiyum Governorate', 'Faiyum Governorate', 'الفيوم' ],
217
+ 'EGGH' => [ 'Gharbia Governorate', 'Gharbia Governorate', 'الغربية' ],
218
+ 'EGGZ' => [ 'Giza Governorate', 'Giza Governorate', 'الجيزة' ],
219
+ 'EGIS' => [ 'Ismailia Governorate', 'Ismailia Governorate', 'الإسماعيلية' ],
220
+ 'EGJS' => [ 'South Sinai Governorate', 'South Sinai Governorate', 'جنوب سيناء' ],
221
+ 'EGKB' => [ 'Qalyubia Governorate', 'Qalyubia Governorate', 'القليوبية' ],
222
+ 'EGKFS' => [ 'Kafr El Sheikh Governorate', 'Kafr El Sheikh Governorate', 'كفر الشيخ' ],
223
+ 'EGKN' => [ 'Qena Governorate', 'Qena Governorate', 'قنا' ],
224
+ 'EGLX' => [ 'Luxor Governorate', 'Luxor Governorate', 'الأقصر' ],
225
+ 'EGMN' => [ 'Menia Governorate', 'Menia Governorate', 'المنيا' ],
226
+ 'EGMNF' => [ 'Menofia Governorate', 'Menofia Governorate', 'المنوفية' ],
227
+ 'EGMT' => [ 'Matrouh Governorate', 'Matrouh Governorate', 'مطروح' ],
228
+ 'EGPTS' => [ 'Port Said Governorate', 'Port Said Governorate', 'بورسعيد' ],
229
+ 'EGSHG' => [ 'Sohag Governorate', 'Sohag Governorate', 'سوهاج' ],
230
+ 'EGSHR' => [ 'Ash Sharqia Governorate', 'Ash Sharqia Governorate', 'الشرقية' ],
231
+ 'EGSIN' => [ 'North Sinai Governorate', 'North Sinai Governorate', 'شمال سيناء' ],
232
+ 'EGSUZ' => [ 'Suez Governorate', 'Suez Governorate', 'السويس' ],
233
+ 'EGWAD' => [ 'New Valley Governorate', 'New Valley Governorate', 'الوادي الجديد' ],
234
+ ],
235
+ // Spain.
236
+ 'ES' => [
237
+ 'C' => [ 'A Coruña', 'A Coruña', NULL ],
238
+ 'VI' => [ 'Álava', 'Álava', NULL ],
239
+ 'AB' => [ 'Albacete', 'Albacete', NULL ],
240
+ 'A' => [ 'Alicante', 'Alicante', NULL ],
241
+ 'AL' => [ 'Almería', 'Almería', NULL ],
242
+ 'O' => [ 'Asturias', 'Asturias', NULL ],
243
+ 'AV' => [ 'Ávila', 'Ávila', NULL ],
244
+ 'BA' => [ 'Badajoz', 'Badajoz', NULL ],
245
+ 'PM' => [ 'Balears', 'Balears', NULL ],
246
+ 'B' => [ 'Barcelona', 'Barcelona', NULL ],
247
+ 'BU' => [ 'Burgos', 'Burgos', NULL ],
248
+ 'CC' => [ 'Cáceres', 'Cáceres', NULL ],
249
+ 'CA' => [ 'Cádiz', 'Cádiz', NULL ],
250
+ 'S' => [ 'Cantabria', 'Cantabria', NULL ],
251
+ 'CS' => [ 'Castellón', 'Castellón', NULL ],
252
+ 'CE' => [ 'Ceuta', 'Ceuta', NULL ],
253
+ 'CR' => [ 'Ciudad Real', 'Ciudad Real', NULL ],
254
+ 'CO' => [ 'Córdoba', 'Córdoba', NULL ],
255
+ 'CU' => [ 'Cuenca', 'Cuenca', NULL ],
256
+ 'GI' => [ 'Girona', 'Girona', NULL ],
257
+ 'GR' => [ 'Granada', 'Granada', NULL ],
258
+ 'GU' => [ 'Guadalajara', 'Guadalajara', NULL ],
259
+ 'SS' => [ 'Guipúzcoa', 'Guipúzcoa', NULL ],
260
+ 'H' => [ 'Huelva', 'Huelva', NULL ],
261
+ 'HU' => [ 'Huesca', 'Huesca', NULL ],
262
+ 'J' => [ 'Jaén', 'Jaén', NULL ],
263
+ 'LO' => [ 'La Rioja', 'La Rioja', NULL ],
264
+ 'GC' => [ 'Las Palmas', 'Las Palmas', NULL ],
265
+ 'LE' => [ 'León', 'León', NULL ],
266
+ 'L' => [ 'Lleida', 'Lleida', NULL ],
267
+ 'LU' => [ 'Lugo', 'Lugo', NULL ],
268
+ 'M' => [ 'Madrid', 'Madrid', NULL ],
269
+ 'MA' => [ 'Málaga', 'Málaga', NULL ],
270
+ 'ML' => [ 'Melilla', 'Melilla', NULL ],
271
+ 'MU' => [ 'Murcia', 'Murcia', NULL ],
272
+ 'NA' => [ 'Navarra', 'Navarra', NULL ],
273
+ 'OR' => [ 'Ourense', 'Ourense', NULL ],
274
+ 'P' => [ 'Palencia', 'Palencia', NULL ],
275
+ 'PO' => [ 'Pontevedra', 'Pontevedra', NULL ],
276
+ 'SA' => [ 'Salamanca', 'Salamanca', NULL ],
277
+ 'TF' => [ 'Santa Cruz de Tenerife', 'Santa Cruz de Tenerife', NULL ],
278
+ 'SG' => [ 'Segovia', 'Segovia', NULL ],
279
+ 'SE' => [ 'Sevilla', 'Sevilla', NULL ],
280
+ 'SO' => [ 'Soria', 'Soria', NULL ],
281
+ 'T' => [ 'Tarragona', 'Tarragona', NULL ],
282
+ 'TE' => [ 'Teruel', 'Teruel', NULL ],
283
+ 'TO' => [ 'Toledo', 'Toledo', NULL ],
284
+ 'V' => [ 'Valencia', 'Valencia', NULL ],
285
+ 'VA' => [ 'Valladolid', 'Valladolid', NULL ],
286
+ 'BI' => [ 'Vizcaya', 'Vizcaya', NULL ],
287
+ 'ZA' => [ 'Zamora', 'Zamora', NULL ],
288
+ 'Z' => [ 'Zaragoza', 'Zaragoza', NULL ],
289
+ ],
290
+ // Finland.
291
+ 'FI' => [],
292
+ // France.
293
+ 'FR' => [],
294
+ // French Guiana.
295
+ 'GF' => [],
296
+ // Ghana.
297
+ 'GH' => [],
298
+ // Guadeloupe.
299
+ 'GP' => [],
300
+ // Greece.
301
+ 'GR' => [],
302
+ // Guatemala.
303
+ 'GT' => [],
304
+ // Hong Kong.
305
+ 'HK' => [
306
+ 'HONG KONG' => [ 'Hong Kong Island', 'Hong Kong Island', '香港島' ],
307
+ 'KOWLOON' => [ 'Kowloon', 'Kowloon', '九龍' ],
308
+ 'NEW TERRITORIES' => [ 'New Territories', 'New Territories', '新界' ],
309
+ ],
310
+ // Hungary.
311
+ 'HU' => [],
312
+ // Indonesia.
313
+ 'ID' => [
314
+ 'AC' => [ 'Aceh', 'Aceh', NULL ],
315
+ 'SU' => [ 'Sumatera Utara', 'Sumatera Utara', NULL ],
316
+ 'SB' => [ 'Sumatera Barat', 'Sumatera Barat', NULL ],
317
+ 'RI' => [ 'Riau', 'Riau', NULL ],
318
+ 'KR' => [ 'Kepulauan Riau', 'Kepulauan Riau', NULL ],
319
+ 'JA' => [ 'Jambi', 'Jambi', NULL ],
320
+ 'SS' => [ 'Sumatera Selatan', 'Sumatera Selatan', NULL ],
321
+ 'BB' => [ 'Kepulauan Bangka Belitung', 'Kepulauan Bangka Belitung', NULL ],
322
+ 'BE' => [ 'Bengkulu', 'Bengkulu', NULL ],
323
+ 'LA' => [ 'Lampung', 'Lampung', NULL ],
324
+ 'JK' => [ 'DKI Jakarta', 'DKI Jakarta', NULL ],
325
+ 'JB' => [ 'Jawa Barat', 'Jawa Barat', NULL ],
326
+ 'BT' => [ 'Banten', 'Banten', NULL ],
327
+ 'JT' => [ 'Jawa Tengah', 'Jawa Tengah', NULL ],
328
+ 'JI' => [ 'Jawa Timur', 'Jawa Timur', NULL ],
329
+ 'YO' => [ 'Daerah Istimewa Yogyakarta', 'Daerah Istimewa Yogyakarta', NULL ],
330
+ 'BA' => [ 'Bali', 'Bali', NULL ],
331
+ 'NB' => [ 'Nusa Tenggara Barat', 'Nusa Tenggara Barat', NULL ],
332
+ 'NT' => [ 'Nusa Tenggara Timur', 'Nusa Tenggara Timur', NULL ],
333
+ 'KB' => [ 'Kalimantan Barat', 'Kalimantan Barat', NULL ],
334
+ 'KT' => [ 'Kalimantan Tengah', 'Kalimantan Tengah', NULL ],
335
+ 'KI' => [ 'Kalimantan Timur', 'Kalimantan Timur', NULL ],
336
+ 'KS' => [ 'Kalimantan Selatan', 'Kalimantan Selatan', NULL ],
337
+ 'KU' => [ 'Kalimantan Utara', 'Kalimantan Utara', NULL ],
338
+ 'SA' => [ 'Sulawesi Utara', 'Sulawesi Utara', NULL ],
339
+ 'ST' => [ 'Sulawesi Tengah', 'Sulawesi Tengah', NULL ],
340
+ 'SG' => [ 'Sulawesi Tenggara', 'Sulawesi Tenggara', NULL ],
341
+ 'SR' => [ 'Sulawesi Barat', 'Sulawesi Barat', NULL ],
342
+ 'SN' => [ 'Sulawesi Selatan', 'Sulawesi Selatan', NULL ],
343
+ 'GO' => [ 'Gorontalo', 'Gorontalo', NULL ],
344
+ 'MA' => [ 'Maluku', 'Maluku', NULL ],
345
+ 'MU' => [ 'Maluku Utara', 'Maluku Utara', NULL ],
346
+ 'PA' => [ 'Papua', 'Papua', NULL ],
347
+ 'PB' => [ 'Papua Barat', 'Papua Barat', NULL ],
348
+ // [ 'Kalimantan Tengah', 'Kalimantan Tengah', NULL ],
349
+ // [ 'Kalimantan Timur', 'Kalimantan Timur', NULL ],
350
+ ],
351
+ // Ireland.
352
+ 'IE' => [
353
+ 'CW' => [ 'Co. Carlow', 'Co. Carlow', NULL ],
354
+ 'CN' => [ 'Co. Cavan', 'Co. Cavan', NULL ],
355
+ 'CE' => [ 'Co. Clare', 'Co. Clare', NULL ],
356
+ 'CO' => [ 'Co. Cork', 'Co. Cork', NULL ],
357
+ 'DL' => [ 'Co. Donegal', 'Co. Donegal', NULL ],
358
+ 'D' => [ 'Co. Dublin', 'Co. Dublin', NULL ],
359
+ 'G' => [ 'Co. Galway', 'Co. Galway', NULL ],
360
+ 'KY' => [ 'Co. Kerry', 'Co. Kerry', NULL ],
361
+ 'KE' => [ 'Co. Kildare', 'Co. Kildare', NULL ],
362
+ 'KK' => [ 'Co. Kilkenny', 'Co. Kilkenny', NULL ],
363
+ 'LS' => [ 'Co. Laois', 'Co. Laois', NULL ],
364
+ 'LM' => [ 'Co. Leitrim', 'Co. Leitrim', NULL ],
365
+ 'LK' => [ 'Co. Limerick', 'Co. Limerick', NULL ],
366
+ 'LD' => [ 'Co. Longford', 'Co. Longford', NULL ],
367
+ 'LH' => [ 'Co. Louth', 'Co. Louth', NULL ],
368
+ 'MO' => [ 'Co. Mayo', 'Co. Mayo', NULL ],
369
+ 'MH' => [ 'Co. Meath', 'Co. Meath', NULL ],
370
+ 'MN' => [ 'Co. Monaghan', 'Co. Monaghan', NULL ],
371
+ 'OY' => [ 'Co. Offaly', 'Co. Offaly', NULL ],
372
+ 'RN' => [ 'Co. Roscommon', 'Co. Roscommon', NULL ],
373
+ 'SO' => [ 'Co. Sligo', 'Co. Sligo', NULL ],
374
+ 'TA' => [ 'Co. Tipperary', 'Co. Tipperary', NULL ],
375
+ 'WD' => [ 'Co. Waterford', 'Co. Waterford', NULL ],
376
+ 'WH' => [ 'Co. Westmeath', 'Co. Westmeath', NULL ],
377
+ 'WX' => [ 'Co. Wexford', 'Co. Wexford', NULL ],
378
+ 'WW' => [ 'Co. Wicklow', 'Co. Wicklow', NULL ],
379
+ ],
380
+ // Israel.
381
+ 'IL' => [],
382
+ // Isle of Man.
383
+ 'IM' => [],
384
+ // India.
385
+ 'IN' => [
386
+ 'AP' => [ 'Andhra Pradesh', 'Andhra Pradesh', NULL ],
387
+ 'AR' => [ 'Arunachal Pradesh', 'Arunachal Pradesh', NULL ],
388
+ 'AS' => [ 'Assam', 'Assam', NULL ],
389
+ 'BR' => [ 'Bihar', 'Bihar', NULL ],
390
+ 'CT' => [ 'Chhattisgarh', 'Chhattisgarh', NULL ],
391
+ 'GA' => [ 'Goa', 'Goa', NULL ],
392
+ 'GJ' => [ 'Gujarat', 'Gujarat', NULL ],
393
+ 'HR' => [ 'Haryana', 'Haryana', NULL ],
394
+ 'HP' => [ 'Himachal Pradesh', 'Himachal Pradesh', NULL ],
395
+ 'JK' => [ 'Jammu and Kashmir', 'Jammu & Kashmir', NULL ],
396
+ 'JH' => [ 'Jharkhand', 'Jharkhand', NULL ],
397
+ 'KA' => [ 'Karnataka', 'Karnataka', NULL ],
398
+ 'KL' => [ 'Kerala', 'Kerala', NULL ],
399
+ // 'LA' => __( 'Ladakh', 'woocommerce' ),
400
+ 'MP' => [ 'Madhya Pradesh', 'Madhya Pradesh', NULL ],
401
+ 'MH' => [ 'Maharashtra', 'Maharashtra', NULL ],
402
+ 'MN' => [ 'Manipur', 'Manipur', NULL ],
403
+ 'ML' => [ 'Meghalaya', 'Meghalaya', NULL ],
404
+ 'MZ' => [ 'Mizoram', 'Mizoram', NULL ],
405
+ 'NL' => [ 'Nagaland', 'Nagaland', NULL ],
406
+ 'OR' => [ 'Odisha', 'Odisha', NULL ],
407
+ 'PB' => [ 'Punjab', 'Punjab', NULL ],
408
+ 'RJ' => [ 'Rajasthan', 'Rajasthan', NULL ],
409
+ 'SK' => [ 'Sikkim', 'Sikkim', NULL ],
410
+ 'TN' => [ 'Tamil Nadu', 'Tamil Nadu', NULL ],
411
+ 'TS' => [ 'Telangana', 'Telangana', NULL ],
412
+ 'TR' => [ 'Tripura', 'Tripura', NULL ],
413
+ 'UK' => [ 'Uttarakhand', 'Uttarakhand', NULL ],
414
+ 'UP' => [ 'Uttar Pradesh', 'Uttar Pradesh', NULL ],
415
+ 'WB' => [ 'West Bengal', 'West Bengal', NULL ],
416
+ 'AN' => [ 'Andaman and Nicobar Islands', 'Andaman & Nicobar', NULL ],
417
+ 'CH' => [ 'Chandigarh', 'Chandigarh', NULL ],
418
+ 'DN' => [ 'Dadra and Nagar Haveli', 'Dadra & Nagar Haveli', NULL ],
419
+ 'DD' => [ 'Daman and Diu', 'Daman & Diu', NULL ],
420
+ 'DL' => [ 'Delhi', 'Delhi', NULL ],
421
+ 'LD' => [ 'Lakshadweep', 'Lakshadweep', NULL ],
422
+ 'PY' => [ 'Puducherry', 'Puducherry', NULL ],
423
+ ],
424
+ // Iran.
425
+ 'IR' => [
426
+ 'KHZ' => [ 'Khuzestan Province', 'Khuzestan Province', 'استان خوزستان' ],
427
+ 'THR' => [ 'Tehran Province', 'Tehran Province', 'استان تهران' ],
428
+ 'ILM' => [ 'Ilam Province', 'Ilam Province', 'استان ایلام' ],
429
+ 'BHR' => [ 'Bushehr Province', 'Bushehr Province', 'استان بوشهر' ],
430
+ 'ADL' => [ 'Ardabil Province', 'Ardabil Province', 'استان اردبیل' ],
431
+ 'ESF' => [ 'Isfahan Province', 'Isfahan Province', 'استان اصفهان' ],
432
+ 'YZD' => [ 'Yazd Province', 'Yazd Province', 'استان یزد' ],
433
+ 'KRH' => [ 'Kermanshah Province', 'Kermanshah Province', 'استان کرمانشاه' ],
434
+ 'KRN' => [ 'Kerman Province', 'Kerman Province', 'استان کرمان' ],
435
+ 'HDN' => [ 'Hamadan Province', 'Hamadan Province', 'استان همدان' ],
436
+ 'GZN' => [ 'Qazvin Province', 'Qazvin Province', 'استان قزوین' ],
437
+ 'ZJN' => [ 'Zanjan Province', 'Zanjan Province', 'استان زنجان' ],
438
+ 'LRS' => [ 'Lorestan Province', 'Lorestan Province', 'استان لرستان' ],
439
+ 'ABZ' => [ 'Alborz Province', 'Alborz Province', 'استان البرز' ],
440
+ 'EAZ' => [ 'East Azerbaijan Province', 'East Azerbaijan Province', 'استان آذربایجان شرقی' ],
441
+ 'WAZ' => [ 'West Azerbaijan Province', 'West Azerbaijan Province', 'استان آذربایجان غربی' ],
442
+ 'CHB' => [ 'Chaharmahal and Bakhtiari Province', 'Chaharmahal and Bakhtiari Province', 'استان چهارمحال و بختیاری' ],
443
+ 'SKH' => [ 'South Khorasan Province', 'South Khorasan Province', 'استان خراسان جنوبی' ],
444
+ 'RKH' => [ 'Razavi Khorasan Province', 'Razavi Khorasan Province', 'استان خراسان رضوی' ],
445
+ 'NKH' => [ 'North Khorasan Province', 'North Khorasan Province', 'استان خراسان شمالی' ],
446
+ 'SMN' => [ 'Semnan Province', 'Semnan Province', 'استان سمنان' ],
447
+ 'FRS' => [ 'Fars Province', 'Fars Province', 'استان فارس' ],
448
+ 'QHM' => [ 'Qom Province', 'Qom Province', 'استان قم' ],
449
+ 'KRD' => [ 'Kurdistan Province', 'Kurdistan Province', 'استان کردستان' ],
450
+ 'KBD' => [ 'Kohgiluyeh and Boyer-Ahmad Province', 'Kohgiluyeh and Boyer-Ahmad Province', 'استان کهگیلویه و بویراحمد' ],
451
+ 'GLS' => [ 'Golestan Province', 'Golestan Province', 'استان گلستان' ],
452
+ 'GIL' => [ 'Gilan Province', 'Gilan Province', 'استان گیلان' ],
453
+ 'MZN' => [ 'Mazandaran Province', 'Mazandaran Province', 'استان مازندران' ],
454
+ 'MKZ' => [ 'Markazi Province', 'Markazi Province', 'استان مرکزی' ],
455
+ 'HRZ' => [ 'Hormozgan Province', 'Hormozgan Province', 'استان هرمزگان' ],
456
+ 'SBN' => [ 'Sistan and Baluchestan Province', 'Sistan and Baluchestan Province', 'استان سیستان و بلوچستان' ],
457
+ ],
458
+ // Iceland.
459
+ 'IS' => [],
460
+ // Italy.
461
+ 'IT' => [
462
+ 'AG' => [ 'AG', 'Agrigento', NULL ],
463
+ 'AL' => [ 'AL', 'Alessandria', NULL ],
464
+ 'AN' => [ 'AN', 'Ancona', NULL ],
465
+ 'AO' => [ 'AO', 'Aosta', NULL ],
466
+ 'AR' => [ 'AR', 'Arezzo', NULL ],
467
+ 'AP' => [ 'AP', 'Ascoli Piceno', NULL ],
468
+ 'AT' => [ 'AT', 'Asti', NULL ],
469
+ 'AV' => [ 'AV', 'Avellino', NULL ],
470
+ 'BA' => [ 'BA', 'Bari', NULL ],
471
+ 'BT' => [ 'BT', 'Barletta-Andria-Trani', NULL ],
472
+ 'BL' => [ 'BL', 'Belluno', NULL ],
473
+ 'BN' => [ 'BN', 'Benevento', NULL ],
474
+ 'BG' => [ 'BG', 'Bergamo', NULL ],
475
+ 'BI' => [ 'BI', 'Biella', NULL ],
476
+ 'BO' => [ 'BO', 'Bologna', NULL ],
477
+ 'BZ' => [ 'BZ', 'Bolzano', NULL ],
478
+ 'BS' => [ 'BS', 'Brescia', NULL ],
479
+ 'BR' => [ 'BR', 'Brindisi', NULL ],
480
+ 'CA' => [ 'CA', 'Cagliari', NULL ],
481
+ 'CL' => [ 'CL', 'Caltanissetta', NULL ],
482
+ 'CB' => [ 'CB', 'Campobasso', NULL ],
483
+ 'CE' => [ 'CE', 'Caserta', NULL ],
484
+ 'CT' => [ 'CT', 'Catania', NULL ],
485
+ 'CZ' => [ 'CZ', 'Catanzaro', NULL ],
486
+ 'CH' => [ 'CH', 'Chieti', NULL ],
487
+ 'CO' => [ 'CO', 'Como', NULL ],
488
+ 'CS' => [ 'CS', 'Cosenza', NULL ],
489
+ 'CR' => [ 'CR', 'Cremona', NULL ],
490
+ 'KR' => [ 'KR', 'Crotone', NULL ],
491
+ 'CN' => [ 'CN', 'Cuneo', NULL ],
492
+ 'EN' => [ 'EN', 'Enna', NULL ],
493
+ 'FM' => [ 'FM', 'Fermo', NULL ],
494
+ 'FE' => [ 'FE', 'Ferrara', NULL ],
495
+ 'FI' => [ 'FI', 'Firenze', NULL ],
496
+ 'FG' => [ 'FG', 'Foggia', NULL ],
497
+ 'FC' => [ 'FC', 'Forlì-Cesena', NULL ],
498
+ 'FR' => [ 'FR', 'Frosinone', NULL ],
499
+ 'GE' => [ 'GE', 'Genova', NULL ],
500
+ 'GO' => [ 'GO', 'Gorizia', NULL ],
501
+ 'GR' => [ 'GR', 'Grosseto', NULL ],
502
+ 'IM' => [ 'IM', 'Imperia', NULL ],
503
+ 'IS' => [ 'IS', 'Isernia', NULL ],
504
+ 'SP' => [ 'SP', 'La Spezia', NULL ],
505
+ 'AQ' => [ 'AQ', "L'Aquila", NULL ],
506
+ 'LT' => [ 'LT', 'Latina', NULL ],
507
+ 'LE' => [ 'LE', 'Lecce', NULL ],
508
+ 'LC' => [ 'LC', 'Lecco', NULL ],
509
+ 'LI' => [ 'LI', 'Livorno', NULL ],
510
+ 'LO' => [ 'LO', 'Lodi', NULL ],
511
+ 'LU' => [ 'LU', 'Lucca', NULL ],
512
+ 'MC' => [ 'MC', 'Macerata', NULL ],
513
+ 'MN' => [ 'MN', 'Mantova', NULL ],
514
+ 'MS' => [ 'MS', 'Massa-Carrara', NULL ],
515
+ 'MT' => [ 'MT', 'Matera', NULL ],
516
+ 'ME' => [ 'ME', 'Messina', NULL ],
517
+ 'MI' => [ 'MI', 'Milano', NULL ],
518
+ 'MO' => [ 'MO', 'Modena', NULL ],
519
+ 'MB' => [ 'MB', 'Monza e Brianza', NULL ],
520
+ 'NA' => [ 'NA', 'Napoli', NULL ],
521
+ 'NO' => [ 'NO', 'Novara', NULL ],
522
+ 'NU' => [ 'NU', 'Nuoro', NULL ],
523
+ 'OR' => [ 'OR', 'Oristano', NULL ],
524
+ 'PD' => [ 'PD', 'Padova', NULL ],
525
+ 'PA' => [ 'PA', 'Palermo', NULL ],
526
+ 'PR' => [ 'PR', 'Parma', NULL ],
527
+ 'PV' => [ 'PV', 'Pavia', NULL ],
528
+ 'PG' => [ 'PG', 'Perugia', NULL ],
529
+ 'PU' => [ 'PU', 'Pesaro e Urbino', NULL ],
530
+ 'PE' => [ 'PE', 'Pescara', NULL ],
531
+ 'PC' => [ 'PC', 'Piacenza', NULL ],
532
+ 'PI' => [ 'PI', 'Pisa', NULL ],
533
+ 'PT' => [ 'PT', 'Pistoia', NULL ],
534
+ 'PN' => [ 'PN', 'Pordenone', NULL ],
535
+ 'PZ' => [ 'PZ', 'Potenza', NULL ],
536
+ 'PO' => [ 'PO', 'Prato', NULL ],
537
+ 'RG' => [ 'RG', 'Ragusa', NULL ],
538
+ 'RA' => [ 'RA', 'Ravenna', NULL ],
539
+ 'RC' => [ 'RC', 'Reggio Calabria', NULL ],
540
+ 'RE' => [ 'RE', 'Reggio Emilia', NULL ],
541
+ 'RI' => [ 'RI', 'Rieti', NULL ],
542
+ 'RN' => [ 'RN', 'Rimini', NULL ],
543
+ 'RM' => [ 'RM', 'Roma', NULL ],
544
+ 'RO' => [ 'RO', 'Rovigo', NULL ],
545
+ 'SA' => [ 'SA', 'Salerno', NULL ],
546
+ 'SS' => [ 'SS', 'Sassari', NULL ],
547
+ 'SV' => [ 'SV', 'Savona', NULL ],
548
+ 'SI' => [ 'SI', 'Siena', NULL ],
549
+ 'SR' => [ 'SR', 'Siracusa', NULL ],
550
+ 'SO' => [ 'SO', 'Sondrio', NULL ],
551
+ 'SU' => [ 'SU', 'Sud Sardegna', NULL ],
552
+ 'TA' => [ 'TA', 'Taranto', NULL ],
553
+ 'TE' => [ 'TE', 'Teramo', NULL ],
554
+ 'TR' => [ 'TR', 'Terni', NULL ],
555
+ 'TO' => [ 'TO', 'Torino', NULL ],
556
+ 'TP' => [ 'TP', 'Trapani', NULL ],
557
+ 'TN' => [ 'TN', 'Trento', NULL ],
558
+ 'TV' => [ 'TV', 'Treviso', NULL ],
559
+ 'TS' => [ 'TS', 'Trieste', NULL ],
560
+ 'UD' => [ 'UD', 'Udine', NULL ],
561
+ 'VA' => [ 'VA', 'Varese', NULL ],
562
+ 'VE' => [ 'VE', 'Venezia', NULL ],
563
+ 'VB' => [ 'VB', 'Verbano-Cusio-Ossola', NULL ],
564
+ 'VC' => [ 'VC', 'Vercelli', NULL ],
565
+ 'VR' => [ 'VR', 'Verona', NULL ],
566
+ 'VV' => [ 'VV', 'Vibo Valentia', NULL ],
567
+ 'VI' => [ 'VI', 'Vicenza', NULL ],
568
+ 'VT' => [ 'VT', 'Viterbo', NULL ],
569
+ ],
570
+ // Jamaica.
571
+ 'JM' => [
572
+ 'JM-01' => [ 'Kingston', 'Kingston', NULL ],
573
+ 'JM-02' => [ 'St. Andrew', 'St. Andrew', NULL ],
574
+ 'JM-03' => [ 'St. Thomas', 'St. Thomas', NULL ],
575
+ 'JM-04' => [ 'Portland', 'Portland', NULL ],
576
+ 'JM-05' => [ 'St. Mary', 'St. Mary', NULL ],
577
+ 'JM-06' => [ 'St. Ann', 'St. Ann', NULL ],
578
+ 'JM-07' => [ 'Trelawny', 'Trelawny', NULL ],
579
+ 'JM-08' => [ 'St. James', 'St. James', NULL ],
580
+ 'JM-09' => [ 'Hanover', 'Hanover', NULL ],
581
+ 'JM-10' => [ 'Westmoreland', 'Westmoreland', NULL ],
582
+ 'JM-11' => [ 'St. Elizabeth', 'St. Elizabeth', NULL ],
583
+ 'JM-12' => [ 'Manchester', 'Manchester', NULL ],
584
+ 'JM-13' => [ 'Clarendon', 'Clarendon', NULL ],
585
+ 'JM-14' => [ 'St. Catherine', 'St. Catherine', NULL ],
586
+ ],
587
+ // Japan.
588
+ 'JP' => [
589
+ 'JP01' => [ 'Hokkaido', 'Hokkaido', '北海道' ],
590
+ 'JP02' => [ 'Aomori', 'Aomori', '青森県' ],
591
+ 'JP03' => [ 'Iwate', 'Iwate', '岩手県' ],
592
+ 'JP04' => [ 'Miyagi', 'Miyagi', '宮城県' ],
593
+ 'JP05' => [ 'Akita', 'Akita', '秋田県' ],
594
+ 'JP06' => [ 'Yamagata', 'Yamagata', '山形県' ],
595
+ 'JP07' => [ 'Fukushima', 'Fukushima', '福島県' ],
596
+ 'JP08' => [ 'Ibaraki', 'Ibaraki', '茨城県' ],
597
+ 'JP09' => [ 'Tochigi', 'Tochigi', '栃木県' ],
598
+ 'JP10' => [ 'Gunma', 'Gunma', '群馬県' ],
599
+ 'JP11' => [ 'Saitama', 'Saitama', '埼玉県' ],
600
+ 'JP12' => [ 'Chiba', 'Chiba', '千葉県' ],
601
+ 'JP13' => [ 'Tokyo', 'Tokyo', '東京都' ],
602
+ 'JP14' => [ 'Kanagawa', 'Kanagawa', '神奈川県' ],
603
+ 'JP15' => [ 'Niigata', 'Niigata', '新潟県' ],
604
+ 'JP16' => [ 'Toyama', 'Toyama', '富山県' ],
605
+ 'JP17' => [ 'Ishikawa', 'Ishikawa', '石川県' ],
606
+ 'JP18' => [ 'Fukui', 'Fukui', '福井県' ],
607
+ 'JP19' => [ 'Yamanashi', 'Yamanashi', '山梨県' ],
608
+ 'JP20' => [ 'Nagano', 'Nagano', '長野県' ],
609
+ 'JP21' => [ 'Gifu', 'Gifu', '岐阜県' ],
610
+ 'JP22' => [ 'Shizuoka', 'Shizuoka', '静岡県' ],
611
+ 'JP23' => [ 'Aichi', 'Aichi', '愛知県' ],
612
+ 'JP24' => [ 'Mie', 'Mie', '三重県' ],
613
+ 'JP25' => [ 'Shiga', 'Shiga', '滋賀県' ],
614
+ 'JP26' => [ 'Kyoto', 'Kyoto', '京都府' ],
615
+ 'JP27' => [ 'Osaka', 'Osaka', '大阪府' ],
616
+ 'JP28' => [ 'Hyogo', 'Hyogo', '兵庫県' ],
617
+ 'JP29' => [ 'Nara', 'Nara', '奈良県' ],
618
+ 'JP30' => [ 'Wakayama', 'Wakayama', '和歌山県' ],
619
+ 'JP31' => [ 'Tottori', 'Tottori', '鳥取県' ],
620
+ 'JP32' => [ 'Shimane', 'Shimane', '島根県' ],
621
+ 'JP33' => [ 'Okayama', 'Okayama', '岡山県' ],
622
+ 'JP34' => [ 'Hiroshima', 'Hiroshima', '広島県' ],
623
+ 'JP35' => [ 'Yamaguchi', 'Yamaguchi', '山口県' ],
624
+ 'JP36' => [ 'Tokushima', 'Tokushima', '徳島県' ],
625
+ 'JP37' => [ 'Kagawa', 'Kagawa', '香川県' ],
626
+ 'JP38' => [ 'Ehime', 'Ehime', '愛媛県' ],
627
+ 'JP39' => [ 'Kochi', 'Kochi', '高知県' ],
628
+ 'JP40' => [ 'Fukuoka', 'Fukuoka', '福岡県' ],
629
+ 'JP41' => [ 'Saga', 'Saga', '佐賀県' ],
630
+ 'JP42' => [ 'Nagasaki', 'Nagasaki', '長崎県' ],
631
+ 'JP43' => [ 'Kumamoto', 'Kumamoto', '熊本県' ],
632
+ 'JP44' => [ 'Oita', 'Oita', '大分県' ],
633
+ 'JP45' => [ 'Miyazaki', 'Miyazaki', '宮崎県' ],
634
+ 'JP46' => [ 'Kagoshima', 'Kagoshima', '鹿児島県' ],
635
+ 'JP47' => [ 'Okinawa', 'Okinawa', '沖縄県' ],
636
+ ],
637
+ // Kenya.
638
+ 'KE' => [],
639
+ // South Korea.
640
+ 'KR' => [],
641
+ // Kuwait.
642
+ 'KW' => [],
643
+ // Laos.
644
+ 'LA' => [],
645
+ // Lebanon.
646
+ 'LB' => [],
647
+ // Sri Lanka.
648
+ 'LK' => [],
649
+ // Liberia.
650
+ 'LR' => [],
651
+ // Luxembourg.
652
+ 'LU' => [],
653
+ // Moldova.
654
+ 'MD' => [],
655
+ // Martinique.
656
+ 'MQ' => [],
657
+ // Malta.
658
+ 'MT' => [],
659
+ // Mexico.
660
+ 'MX' => [
661
+ 'DF' => [ 'CDMX', 'Ciudad de México', NULL ],
662
+ 'JA' => [ 'Jal.', 'Jalisco', NULL ],
663
+ 'NL' => [ 'N.L.', 'Nuevo León', NULL ],
664
+ 'AG' => [ 'Ags.', 'Aguascalientes', NULL ],
665
+ 'BC' => [ 'B.C.', 'Baja California', NULL ],
666
+ 'BS' => [ 'B.C.S.', 'Baja California Sur', NULL ],
667
+ 'CM' => [ 'Camp.', 'Campeche', NULL ],
668
+ 'CS' => [ 'Chis.', 'Chiapas', NULL ],
669
+ 'CH' => [ 'Chih.', 'Chihuahua', NULL ],
670
+ 'CO' => [ 'Coah.', 'Coahuila de Zaragoza', NULL ],
671
+ 'CL' => [ 'Col.', 'Colima', NULL ],
672
+ 'DG' => [ 'Dgo.', 'Durango', NULL ],
673
+ 'GT' => [ 'Gto.', 'Guanajuato', NULL ],
674
+ 'GR' => [ 'Gro.', 'Guerrero', NULL ],
675
+ 'HG' => [ 'Hgo.', 'Hidalgo', NULL ],
676
+ 'MX' => [ 'Méx.', 'Estado de México', NULL ],
677
+ 'MI' => [ 'Mich.', 'Michoacán', NULL ],
678
+ 'MO' => [ 'Mor.', 'Morelos', NULL ],
679
+ 'NA' => [ 'Nay.', 'Nayarit', NULL ],
680
+ 'OA' => [ 'Oax.', 'Oaxaca', NULL ],
681
+ 'PU' => [ 'Pue.', 'Puebla', NULL ],
682
+ 'QT' => [ 'Qro.', 'Querétaro', NULL ],
683
+ 'QR' => [ 'Q.R.', 'Quintana Roo', NULL ],
684
+ 'SL' => [ 'S.L.P.', 'San Luis Potosí', NULL ],
685
+ 'SI' => [ 'Sin.', 'Sinaloa', NULL ],
686
+ 'SO' => [ 'Son.', 'Sonora', NULL ],
687
+ 'TB' => [ 'Tab.', 'Tabasco', NULL ],
688
+ 'TM' => [ 'Tamps.', 'Tamaulipas', NULL ],
689
+ 'TL' => [ 'Tlax.', 'Tlaxcala', NULL ],
690
+ 'VE' => [ 'Ver.', 'Veracruz', NULL ],
691
+ 'YU' => [ 'Yuc.', 'Yucatán', NULL ],
692
+ 'ZA' => [ 'Zac.', 'Zacatecas', NULL ],
693
+ ],
694
+ // Malaysia.
695
+ 'MY' => [
696
+ 'JHR' => [ 'Johor', 'Johor', NULL ],
697
+ 'KDH' => [ 'Kedah', 'Kedah', NULL ],
698
+ 'KTN' => [ 'Kelantan', 'Kelantan', NULL ],
699
+ 'LBN' => [ 'Labuan', 'Labuan', NULL ],
700
+ 'MLK' => [ 'Melaka', 'Melaka', NULL ],
701
+ 'NSN' => [ 'Negeri Sembilan', 'Negeri Sembilan', NULL ],
702
+ 'PHG' => [ 'Pahang', 'Pahang', NULL ],
703
+ 'PNG' => [ 'Pulau Pinang', 'Pulau Pinang', NULL ],
704
+ 'PRK' => [ 'Perak', 'Perak', NULL ],
705
+ 'PLS' => [ 'Perlis', 'Perlis', NULL ],
706
+ 'SBH' => [ 'Sabah', 'Sabah', NULL ],
707
+ 'SWK' => [ 'Sarawak', 'Sarawak', NULL ],
708
+ 'SGR' => [ 'Selangor', 'Selangor', NULL ],
709
+ 'TRG' => [ 'Terengganu', 'Terengganu', NULL ],
710
+ 'PJY' => [ 'Putrajaya', 'Putrajaya', NULL ],
711
+ 'KUL' => [ 'Kuala Lumpur', 'Kuala Lumpur', NULL ],
712
+ ],
713
+ // Mozambique.
714
+ 'MZ' => [
715
+ 'MZP' => [ 'Cabo Delgado', 'Cabo Delgado', NULL ],
716
+ 'MZG' => [ 'Gaza', 'Gaza', NULL ],
717
+ 'MZI' => [ 'Inhambane', 'Inhambane', NULL ],
718
+ 'MZB' => [ 'Manica', 'Manica', NULL ],
719
+ 'MZL' => [ 'Maputo', 'Maputo', NULL ],
720
+ 'MZMPM' => [ 'Cidade de Maputo', 'Cidade de Maputo', NULL ],
721
+ 'MZN' => [ 'Nampula', 'Nampula', NULL ],
722
+ 'MZA' => [ 'Niassa', 'Niassa', NULL ],
723
+ 'MZS' => [ 'Sofala', 'Sofala', NULL ],
724
+ 'MZT' => [ 'Tete', 'Tete', NULL ],
725
+ 'MZQ' => [ 'Zambezia', 'Zambezia', NULL ],
726
+ ],
727
+ // Namibia.
728
+ 'NA' => [],
729
+ // Nigeria.
730
+ 'NG' => [
731
+ 'AB' => [ 'Abia', 'Abia', NULL ],
732
+ 'FC' => [ 'Federal Capital Territory', 'Federal Capital Territory', NULL ],
733
+ 'AD' => [ 'Adamawa', 'Adamawa', NULL ],
734
+ 'AK' => [ 'Akwa Ibom', 'Akwa Ibom', NULL ],
735
+ 'AN' => [ 'Anambra', 'Anambra', NULL ],
736
+ 'BA' => [ 'Bauchi', 'Bauchi', NULL ],
737
+ 'BY' => [ 'Bayelsa', 'Bayelsa', NULL ],
738
+ 'BE' => [ 'Benue', 'Benue', NULL ],
739
+ 'BO' => [ 'Borno', 'Borno', NULL ],
740
+ 'CR' => [ 'Cross River', 'Cross River', NULL ],
741
+ 'DE' => [ 'Delta', 'Delta', NULL ],
742
+ 'EB' => [ 'Ebonyi', 'Ebonyi', NULL ],
743
+ 'ED' => [ 'Edo', 'Edo', NULL ],
744
+ 'EK' => [ 'Ekiti', 'Ekiti', NULL ],
745
+ 'EN' => [ 'Enugu', 'Enugu', NULL ],
746
+ 'GO' => [ 'Gombe', 'Gombe', NULL ],
747
+ 'IM' => [ 'Imo', 'Imo', NULL ],
748
+ 'JI' => [ 'Jigawa', 'Jigawa', NULL ],
749
+ 'KD' => [ 'Kaduna', 'Kaduna', NULL ],
750
+ 'KN' => [ 'Kano', 'Kano', NULL ],
751
+ 'KT' => [ 'Katsina', 'Katsina', NULL ],
752
+ 'KE' => [ 'Kebbi', 'Kebbi', NULL ],
753
+ 'KO' => [ 'Kogi', 'Kogi', NULL ],
754
+ 'KW' => [ 'Kwara', 'Kwara', NULL ],
755
+ 'LA' => [ 'Lagos', 'Lagos', NULL ],
756
+ 'NA' => [ 'Nasarawa', 'Nasarawa', NULL ],
757
+ 'NI' => [ 'Niger', 'Niger', NULL ],
758
+ 'OG' => [ 'Ogun State', 'Ogun State', NULL ],
759
+ 'ON' => [ 'Ondo', 'Ondo', NULL ],
760
+ 'OS' => [ 'Osun', 'Osun', NULL ],
761
+ 'OY' => [ 'Oyo', 'Oyo', NULL ],
762
+ 'PL' => [ 'Plateau', 'Plateau', NULL ],
763
+ 'RI' => [ 'Rivers', 'Rivers', NULL ],
764
+ 'SO' => [ 'Sokoto', 'Sokoto', NULL ],
765
+ 'TA' => [ 'Taraba', 'Taraba', NULL ],
766
+ 'YO' => [ 'Yobe', 'Yobe', NULL ],
767
+ 'ZA' => [ 'Zamfara', 'Zamfara', NULL ],
768
+ ],
769
+ // Netherlands.
770
+ 'NL' => [],
771
+ // Norway.
772
+ 'NO' => [],
773
+ // Nepal.
774
+ 'NP' => [],
775
+ // New Zealand.
776
+ 'NZ' => [],
777
+ // Peru.
778
+ 'PE' => [
779
+ 'CAL' => [ 'Callao', 'Callao', NULL ],
780
+ 'LMA' => [ 'Municipalidad Metropolitana de Lima', 'Municipalidad Metropolitana de Lima', NULL ],
781
+ 'AMA' => [ 'Amazonas', 'Amazonas', NULL ],
782
+ 'ANC' => [ 'Áncash', 'Áncash', NULL ],
783
+ 'APU' => [ 'Apurímac', 'Apurímac', NULL ],
784
+ 'ARE' => [ 'Arequipa', 'Arequipa', NULL ],
785
+ 'AYA' => [ 'Ayacucho', 'Ayacucho', NULL ],
786
+ 'CAJ' => [ 'Cajamarca', 'Cajamarca', NULL ],
787
+ 'CUS' => [ 'Cuzco', 'Cuzco', NULL ],
788
+ 'HUV' => [ 'Huancavelica', 'Huancavelica', NULL ],
789
+ 'HUC' => [ 'Huánuco', 'Huánuco', NULL ],
790
+ 'ICA' => [ 'Ica', 'Ica', NULL ],
791
+ 'JUN' => [ 'Junín', 'Junín', NULL ],
792
+ 'LAL' => [ 'La Libertad', 'La Libertad', NULL ],
793
+ 'LAM' => [ 'Lambayeque', 'Lambayeque', NULL ],
794
+ 'LIM' => [ 'Gobierno Regional de Lima', 'Gobierno Regional de Lima', NULL ],
795
+ 'LOR' => [ 'Loreto', 'Loreto', NULL ],
796
+ 'MDD' => [ 'Madre de Dios', 'Madre de Dios', NULL ],
797
+ 'MOQ' => [ 'Moquegua', 'Moquegua', NULL ],
798
+ 'PAS' => [ 'Pasco', 'Pasco', NULL ],
799
+ 'PIU' => [ 'Piura', 'Piura', NULL ],
800
+ 'PUN' => [ 'Puno', 'Puno', NULL ],
801
+ 'SAM' => [ 'San Martín', 'San Martín', NULL ],
802
+ 'TAC' => [ 'Tacna', 'Tacna', NULL ],
803
+ 'TUM' => [ 'Tumbes', 'Tumbes', NULL ],
804
+ 'UCA' => [ 'Ucayali', 'Ucayali', NULL ],
805
+ ],
806
+ // Philippines.
807
+ 'PH' => [
808
+ 'ABR' => [ 'Abra', 'Abra', NULL ],
809
+ 'AGN' => [ 'Agusan del Norte', 'Agusan del Norte', NULL ],
810
+ 'AGS' => [ 'Agusan del Sur', 'Agusan del Sur', NULL ],
811
+ 'AKL' => [ 'Aklan', 'Aklan', NULL ],
812
+ 'ALB' => [ 'Albay', 'Albay', NULL ],
813
+ 'ANT' => [ 'Antique', 'Antique', NULL ],
814
+ 'APA' => [ 'Apayao', 'Apayao', NULL ],
815
+ 'AUR' => [ 'Aurora', 'Aurora', NULL ],
816
+ 'BAS' => [ 'Basilan', 'Basilan', NULL ],
817
+ 'BAN' => [ 'Bataan', 'Bataan', NULL ],
818
+ 'BTN' => [ 'Batanes', 'Batanes', NULL ],
819
+ 'BTG' => [ 'Batangas', 'Batangas', NULL ],
820
+ 'BEN' => [ 'Benguet', 'Benguet', NULL ],
821
+ 'BIL' => [ 'Biliran', 'Biliran', NULL ],
822
+ 'BOH' => [ 'Bohol', 'Bohol', NULL ],
823
+ 'BUK' => [ 'Bukidnon', 'Bukidnon', NULL ],
824
+ 'BUL' => [ 'Bulacan', 'Bulacan', NULL ],
825
+ 'CAG' => [ 'Cagayan', 'Cagayan', NULL ],
826
+ 'CAN' => [ 'Camarines Norte', 'Camarines Norte', NULL ],
827
+ 'CAS' => [ 'Camarines Sur', 'Camarines Sur', NULL ],
828
+ 'CAM' => [ 'Camiguin', 'Camiguin', NULL ],
829
+ 'CAP' => [ 'Capiz', 'Capiz', NULL ],
830
+ 'CAT' => [ 'Catanduanes', 'Catanduanes', NULL ],
831
+ 'CAV' => [ 'Cavite', 'Cavite', NULL ],
832
+ 'CEB' => [ 'Cebu', 'Cebu', NULL ],
833
+ 'COM' => [ 'Compostela Valley', 'Compostela Valley', NULL ],
834
+ 'NCO' => [ 'Cotabato', 'Cotabato', NULL ],
835
+ 'DAV' => [ 'Davao del Norte', 'Davao del Norte', NULL ],
836
+ 'DAS' => [ 'Davao del Sur', 'Davao del Sur', NULL ],
837
+ 'DAC' => [ 'Davao Occidental', 'Davao Occidental', NULL ],
838
+ 'DAO' => [ 'Davao Oriental', 'Davao Oriental', NULL ],
839
+ 'DIN' => [ 'Dinagat Islands', 'Dinagat Islands', NULL ],
840
+ 'EAS' => [ 'Eastern Samar', 'Eastern Samar', NULL ],
841
+ 'GUI' => [ 'Guimaras', 'Guimaras', NULL ],
842
+ 'IFU' => [ 'Ifugao', 'Ifugao', NULL ],
843
+ 'ILN' => [ 'Ilocos Norte', 'Ilocos Norte', NULL ],
844
+ 'ILS' => [ 'Ilocos Sur', 'Ilocos Sur', NULL ],
845
+ 'ILI' => [ 'Iloilo', 'Iloilo', NULL ],
846
+ 'ISA' => [ 'Isabela', 'Isabela', NULL ],
847
+ 'KAL' => [ 'Kalinga', 'Kalinga', NULL ],
848
+ 'LUN' => [ 'La Union', 'La Union', NULL ],
849
+ 'LAG' => [ 'Laguna', 'Laguna', NULL ],
850
+ 'LAN' => [ 'Lanao del Norte', 'Lanao del Norte', NULL ],
851
+ 'LAS' => [ 'Lanao del Sur', 'Lanao del Sur', NULL ],
852
+ 'LEY' => [ 'Leyte', 'Leyte', NULL ],
853
+ 'MAG' => [ 'Maguindanao', 'Maguindanao', NULL ],
854
+ 'MAD' => [ 'Marinduque', 'Marinduque', NULL ],
855
+ 'MAS' => [ 'Masbate', 'Masbate', NULL ],
856
+ 'MSC' => [ 'Misamis Occidental', 'Misamis Occidental', NULL ],
857
+ 'MSR' => [ 'Misamis Oriental', 'Misamis Oriental', NULL ],
858
+ 'MOU' => [ 'Mountain Province', 'Mountain Province', NULL ],
859
+ 'NEC' => [ 'Negros Occidental', 'Negros Occidental', NULL ],
860
+ 'NER' => [ 'Negros Oriental', 'Negros Oriental', NULL ],
861
+ 'NSA' => [ 'Northern Samar', 'Northern Samar', NULL ],
862
+ 'NUE' => [ 'Nueva Ecija', 'Nueva Ecija', NULL ],
863
+ 'NUV' => [ 'Nueva Vizcaya', 'Nueva Vizcaya', NULL ],
864
+ 'MDC' => [ 'Mindoro Occidental', 'Mindoro Occidental', NULL ],
865
+ 'MDR' => [ 'Mindoro Oriental', 'Mindoro Oriental', NULL ],
866
+ 'PLW' => [ 'Palawan', 'Palawan', NULL ],
867
+ 'PAM' => [ 'Pampanga', 'Pampanga', NULL ],
868
+ 'PAN' => [ 'Pangasinan', 'Pangasinan', NULL ],
869
+ 'QUE' => [ 'Quezon Province', 'Quezon Province', NULL ],
870
+ 'QUI' => [ 'Quirino', 'Quirino', NULL ],
871
+ 'RIZ' => [ 'Rizal', 'Rizal', NULL ],
872
+ 'ROM' => [ 'Romblon', 'Romblon', NULL ],
873
+ 'WSA' => [ 'Samar', 'Samar', NULL ],
874
+ 'SAR' => [ 'Sarangani', 'Sarangani', NULL ],
875
+ 'SIQ' => [ 'Siquijor', 'Siquijor', NULL ],
876
+ 'SOR' => [ 'Sorsogon', 'Sorsogon', NULL ],
877
+ 'SCO' => [ 'South Cotabato', 'South Cotabato', NULL ],
878
+ 'SLE' => [ 'Southern Leyte', 'Southern Leyte', NULL ],
879
+ 'SUK' => [ 'Sultan Kudarat', 'Sultan Kudarat', NULL ],
880
+ 'SLU' => [ 'Sulu', 'Sulu', NULL ],
881
+ 'SUN' => [ 'Surigao del Norte', 'Surigao del Norte', NULL ],
882
+ 'SUR' => [ 'Surigao del Sur', 'Surigao del Sur', NULL ],
883
+ 'TAR' => [ 'Tarlac', 'Tarlac', NULL ],
884
+ 'TAW' => [ 'Tawi-Tawi', 'Tawi-Tawi', NULL ],
885
+ 'ZMB' => [ 'Zambales', 'Zambales', NULL ],
886
+ 'ZAN' => [ 'Zamboanga del Norte', 'Zamboanga del Norte', NULL ],
887
+ 'ZAS' => [ 'Zamboanga del Sur', 'Zamboanga del Sur', NULL ],
888
+ 'ZSI' => [ 'Zamboanga Sibuguey', 'Zamboanga Sibuguey', NULL ],
889
+ '00' => [ 'Metro Manila', 'Metro Manila', NULL ],
890
+ ],
891
+ // Pakistan.
892
+ 'PK' => [],
893
+ // Poland.
894
+ 'PL' => [],
895
+ // Puerto Rico.
896
+ 'PR' => [],
897
+ // Portugal.
898
+ 'PT' => [],
899
+ // Paraguay.
900
+ 'PY' => [],
901
+ // Reunion.
902
+ 'RE' => [],
903
+ // Romania.
904
+ 'RO' => [],
905
+ // Serbia.
906
+ 'RS' => [],
907
+ // Sweden.
908
+ 'SE' => [],
909
+ // Singapore.
910
+ 'SG' => [],
911
+ // Slovenia.
912
+ 'SI' => [],
913
+ // Slovakia.
914
+ 'SK' => [],
915
+ // Thailand.
916
+ 'TH' => [
917
+ 'TH-37' => [ 'Amnat Charoen', 'Amnat Charoen', 'อำนาจเจริญ' ],
918
+ 'TH-15' => [ 'Ang Thong', 'Ang Thong', 'อ่างทอง' ],
919
+ 'TH-14' => [ 'Phra Nakhon Si Ayutthaya', 'Phra Nakhon Si Ayutthaya', 'พระนครศรีอยุธยา' ],
920
+ 'TH-10' => [ 'Bangkok', 'Bangkok', 'กรุงเทพมหานคร' ],
921
+ 'TH-38' => [ 'Bueng Kan', 'Bueng Kan', 'จังหวัด บึงกาฬ' ],
922
+ 'TH-31' => [ 'Buri Ram', 'Buri Ram', 'บุรีรัมย์' ],
923
+ 'TH-24' => [ 'Chachoengsao', 'Chachoengsao', 'ฉะเชิงเทรา' ],
924
+ 'TH-18' => [ 'Chai Nat', 'Chai Nat', 'ชัยนาท' ],
925
+ 'TH-36' => [ 'Chaiyaphum', 'Chaiyaphum', 'ชัยภูมิ' ],
926
+ 'TH-22' => [ 'Chanthaburi', 'Chanthaburi', 'จันทบุรี' ],
927
+ 'TH-50' => [ 'Chiang Rai', 'Chiang Rai', 'เชียงราย' ],
928
+ 'TH-57' => [ 'Chiang Mai', 'Chiang Mai', 'เชียงใหม่' ],
929
+ 'TH-20' => [ 'Chon Buri', 'Chon Buri', 'ชลบุรี' ],
930
+ 'TH-86' => [ 'Chumpon', 'Chumpon', 'ชุมพร' ],
931
+ 'TH-46' => [ 'Kalasin', 'Kalasin', 'กาฬสินธุ์' ],
932
+ 'TH-62' => [ 'Kamphaeng Phet', 'Kamphaeng Phet', 'กำแพงเพชร' ],
933
+ 'TH-71' => [ 'Kanchanaburi', 'Kanchanaburi', 'กาญจนบุรี' ],
934
+ 'TH-40' => [ 'Khon Kaen', 'Khon Kaen', 'ขอนแก่น' ],
935
+ 'TH-81' => [ 'Krabi', 'Krabi', 'กระบี่' ],
936
+ 'TH-52' => [ 'Lampang', 'Lampang', 'ลำปาง' ],
937
+ 'TH-51' => [ 'Lamphun', 'Lamphun', 'ลำพูน' ],
938
+ 'TH-42' => [ 'Loei', 'Loei', 'เลย' ],
939
+ 'TH-16' => [ 'Lop Buri', 'Lop Buri', 'ลพบุรี' ],
940
+ 'TH-58' => [ 'Mae Hong Son', 'Mae Hong Son', 'แม่ฮ่องสอน' ],
941
+ 'TH-44' => [ 'Maha Sarakham', 'Maha Sarakham', 'มหาสารคาม' ],
942
+ 'TH-49' => [ 'Mukdahan', 'Mukdahan', 'มุกดาหาร' ],
943
+ 'TH-26' => [ 'Nakhon Nayok', 'Nakhon Nayok', 'นครนายก' ],
944
+ 'TH-73' => [ 'Nakhon Pathom', 'Nakhon Pathom', 'นครปฐม' ],
945
+ 'TH-48' => [ 'Nakhon Phanom', 'Nakhon Phanom', 'นครพนม' ],
946
+ 'TH-30' => [ 'Nakhon Ratchasima', 'Nakhon Ratchasima', 'นครราชสีมา' ],
947
+ 'TH-60' => [ 'Nakhon Sawan', 'Nakhon Sawan', 'นครสวรรค์' ],
948
+ 'TH-80' => [ 'Nakhon Si Thammarat', 'Nakhon Si Thammarat', 'นครศรีธรรมราช' ],
949
+ 'TH-55' => [ 'Nan', 'Nan', 'น่าน' ],
950
+ 'TH-96' => [ 'Narathiwat', 'Narathiwat', 'นราธิวาส' ],
951
+ 'TH-39' => [ 'Nong Bua Lam Phu', 'Nong Bua Lam Phu', 'หนองบัวลำภู' ],
952
+ 'TH-43' => [ 'Nong Khai', 'Nong Khai', 'หนองคาย' ],
953
+ 'TH-12' => [ 'Nonthaburi', 'Nonthaburi', 'นนทบุรี' ],
954
+ 'TH-13' => [ 'Pathum Thani', 'Pathum Thani', 'ปทุมธานี' ],
955
+ 'TH-94' => [ 'Pattani', 'Pattani', 'ปัตตานี' ],
956
+ 'TH-82' => [ 'Phang Nga', 'Phang Nga', 'พังงา' ],
957
+ 'TH-93' => [ 'Phattalung', 'Phattalung', 'พัทลุง' ],
958
+ 'TH-56' => [ 'Phayao', 'Phayao', 'พะเยา' ],
959
+ 'TH-67' => [ 'Phetchabun', 'Phetchabun', 'เพชรบูรณ์' ],
960
+ 'TH-76' => [ 'Phetchaburi', 'Phetchaburi', 'เพชรบุรี' ],
961
+ 'TH-66' => [ 'Phichit', 'Phichit', 'พิจิตร' ],
962
+ 'TH-65' => [ 'Phitsanulok', 'Phitsanulok', 'พิษณุโลก' ],
963
+ 'TH-54' => [ 'Phrae', 'Phrae', 'แพร่' ],
964
+ 'TH-83' => [ 'Phuket', 'Phuket', 'ภูเก็ต' ],
965
+ 'TH-25' => [ 'Prachin Buri', 'Prachin Buri', 'ปราจีนบุรี' ],
966
+ 'TH-77' => [ 'Prachuap Khiri Khan', 'Prachuap Khiri Khan', 'ประจวบคีรีขันธ์' ],
967
+ 'TH-85' => [ 'Ranong', 'Ranong', 'ระนอง' ],
968
+ 'TH-70' => [ 'Ratchaburi', 'Ratchaburi', 'ราชบุรี' ],
969
+ 'TH-21' => [ 'Rayong', 'Rayong', 'ระยอง' ],
970
+ 'TH-45' => [ 'Roi Et', 'Roi Et', 'ร้อยเอ็ด' ],
971
+ 'TH-27' => [ 'Sa Kaeo', 'Sa Kaeo', 'สระแก้ว' ],
972
+ 'TH-47' => [ 'Sakon Nakhon', 'Sakon Nakhon', 'สกลนคร' ],
973
+ 'TH-11' => [ 'Samut Prakan', 'Samut Prakan', 'สมุทรปราการ' ],
974
+ 'TH-74' => [ 'Samut Sakhon', 'Samut Sakhon', 'สมุทรสาคร' ],
975
+ 'TH-75' => [ 'Samut Songkhram', 'Samut Songkhram', 'สมุทรสงคราม' ],
976
+ 'TH-19' => [ 'Saraburi', 'Saraburi', 'สระบุรี' ],
977
+ 'TH-91' => [ 'Satun', 'Satun', 'สตูล' ],
978
+ 'TH-17' => [ 'Sing Buri', 'Sing Buri', 'สิงห์บุรี' ],
979
+ 'TH-33' => [ 'Si Sa Ket', 'Si Sa Ket', 'ศรีสะเกษ' ],
980
+ 'TH-90' => [ 'Songkhla', 'Songkhla', 'สงขลา' ],
981
+ 'TH-64' => [ 'Sukhothai', 'Sukhothai', 'สุโขทัย' ],
982
+ 'TH-72' => [ 'Suphanburi', 'Suphanburi', 'สุพรรณบุรี' ],
983
+ 'TH-84' => [ 'Surat Thani', 'Surat Thani', 'สุราษฎร์ธานี' ],
984
+ 'TH-32' => [ 'Surin', 'Surin', 'สุรินทร์' ],
985
+ 'TH-63' => [ 'Tak', 'Tak', 'ตาก' ],
986
+ 'TH-92' => [ 'Trang', 'Trang', 'ตรัง' ],
987
+ 'TH-23' => [ 'Trat', 'Trat', 'ตราด' ],
988
+ 'TH-34' => [ 'Ubon Ratchathani', 'Ubon Ratchathani', 'อุบลราชธานี' ],
989
+ 'TH-41' => [ 'Udon Thani', 'Udon Thani', 'อุดรธานี' ],
990
+ 'TH-61' => [ 'Uthai Thani', 'Uthai Thani', 'อุทัยธานี' ],
991
+ 'TH-53' => [ 'Uttaradit', 'Uttaradit', 'อุตรดิตถ์' ],
992
+ 'TH-95' => [ 'Yala', 'Yala', 'ยะลา' ],
993
+ 'TH-35' => [ 'Yasothon', 'Yasothon', 'ยโสธร' ],
994
+ ],
995
+ // Turkey.
996
+ 'TR' => [
997
+ 'TR01' => [ 'Adana', 'Adana', NULL ],
998
+ 'TR02' => [ 'Adıyaman', 'Adıyaman', NULL ],
999
+ 'TR03' => [ 'Afyon', 'Afyon', NULL ],
1000
+ 'TR04' => [ 'Ağrı', 'Ağrı', NULL ],
1001
+ 'TR05' => [ 'Amasya', 'Amasya', NULL ],
1002
+ 'TR06' => [ 'Ankara', 'Ankara', NULL ],
1003
+ 'TR07' => [ 'Antalya', 'Antalya', NULL ],
1004
+ 'TR08' => [ 'Artvin', 'Artvin', NULL ],
1005
+ 'TR09' => [ 'Aydın', 'Aydın', NULL ],
1006
+ 'TR10' => [ 'Balıkesir', 'Balıkesir', NULL ],
1007
+ 'TR11' => [ 'Bilecik', 'Bilecik', NULL ],
1008
+ 'TR12' => [ 'Bingöl', 'Bingöl', NULL ],
1009
+ 'TR13' => [ 'Bitlis', 'Bitlis', NULL ],
1010
+ 'TR14' => [ 'Bolu', 'Bolu', NULL ],
1011
+ 'TR15' => [ 'Burdur', 'Burdur', NULL ],
1012
+ 'TR16' => [ 'Bursa', 'Bursa', NULL ],
1013
+ 'TR17' => [ 'Çanakkale', 'Çanakkale', NULL ],
1014
+ 'TR18' => [ 'Çankırı', 'Çankırı', NULL ],
1015
+ 'TR19' => [ 'Çorum', 'Çorum', NULL ],
1016
+ 'TR20' => [ 'Denizli', 'Denizli', NULL ],
1017
+ 'TR21' => [ 'Diyarbakır', 'Diyarbakır', NULL ],
1018
+ 'TR22' => [ 'Edirne', 'Edirne', NULL ],
1019
+ 'TR23' => [ 'Elazığ', 'Elazığ', NULL ],
1020
+ 'TR24' => [ 'Erzincan', 'Erzincan', NULL ],
1021
+ 'TR25' => [ 'Erzurum', 'Erzurum', NULL ],
1022
+ 'TR26' => [ 'Eskişehir', 'Eskişehir', NULL ],
1023
+ 'TR27' => [ 'Gaziantep', 'Gaziantep', NULL ],
1024
+ 'TR28' => [ 'Giresun', 'Giresun', NULL ],
1025
+ 'TR29' => [ 'Gümüşhane', 'Gümüşhane', NULL ],
1026
+ 'TR30' => [ 'Hakkari', 'Hakkari', NULL ],
1027
+ 'TR31' => [ 'Hatay', 'Hatay', NULL ],
1028
+ 'TR32' => [ 'Isparta', 'Isparta', NULL ],
1029
+ 'TR33' => [ 'Mersin', 'Mersin', NULL ],
1030
+ 'TR34' => [ 'İstanbul', 'İstanbul', NULL ],
1031
+ 'TR35' => [ 'İzmir', 'İzmir', NULL ],
1032
+ 'TR36' => [ 'Kars', 'Kars', NULL ],
1033
+ 'TR37' => [ 'Kastamonu', 'Kastamonu', NULL ],
1034
+ 'TR38' => [ 'Kayseri', 'Kayseri', NULL ],
1035
+ 'TR39' => [ 'Kırklareli', 'Kırklareli', NULL ],
1036
+ 'TR40' => [ 'Kırşehir', 'Kırşehir', NULL ],
1037
+ 'TR41' => [ 'Kocaeli', 'Kocaeli', NULL ],
1038
+ 'TR42' => [ 'Konya', 'Konya', NULL ],
1039
+ 'TR43' => [ 'Kütahya', 'Kütahya', NULL ],
1040
+ 'TR44' => [ 'Malatya', 'Malatya', NULL ],
1041
+ 'TR45' => [ 'Manisa', 'Manisa', NULL ],
1042
+ 'TR46' => [ 'Kahramanmaraş', 'Kahramanmaraş', NULL ],
1043
+ 'TR47' => [ 'Mardin', 'Mardin', NULL ],
1044
+ 'TR48' => [ 'Muğla', 'Muğla', NULL ],
1045
+ 'TR49' => [ 'Muş', 'Muş', NULL ],
1046
+ 'TR50' => [ 'Nevşehir', 'Nevşehir', NULL ],
1047
+ 'TR51' => [ 'Niğde', 'Niğde', NULL ],
1048
+ 'TR52' => [ 'Ordu', 'Ordu', NULL ],
1049
+ 'TR53' => [ 'Rize', 'Rize', NULL ],
1050
+ 'TR54' => [ 'Sakarya', 'Sakarya', NULL ],
1051
+ 'TR55' => [ 'Samsun', 'Samsun', NULL ],
1052
+ 'TR56' => [ 'Siirt', 'Siirt', NULL ],
1053
+ 'TR57' => [ 'Sinop', 'Sinop', NULL ],
1054
+ 'TR58' => [ 'Sivas', 'Sivas', NULL ],
1055
+ 'TR59' => [ 'Tekirdağ', 'Tekirdağ', NULL ],
1056
+ 'TR60' => [ 'Tokat', 'Tokat', NULL ],
1057
+ 'TR61' => [ 'Trabzon', 'Trabzon', NULL ],
1058
+ 'TR62' => [ 'Tunceli', 'Tunceli', NULL ],
1059
+ 'TR63' => [ 'Şanlıurfa', 'Şanlıurfa', NULL ],
1060
+ 'TR64' => [ 'Uşak', 'Uşak', NULL ],
1061
+ 'TR65' => [ 'Van', 'Van', NULL ],
1062
+ 'TR66' => [ 'Yozgat', 'Yozgat', NULL ],
1063
+ 'TR67' => [ 'Zonguldak', 'Zonguldak', NULL ],
1064
+ 'TR68' => [ 'Aksaray', 'Aksaray', NULL ],
1065
+ 'TR69' => [ 'Bayburt', 'Bayburt', NULL ],
1066
+ 'TR70' => [ 'Karaman', 'Karaman', NULL ],
1067
+ 'TR71' => [ 'Kırıkkale', 'Kırıkkale', NULL ],
1068
+ 'TR72' => [ 'Batman', 'Batman', NULL ],
1069
+ 'TR73' => [ 'Şırnak', 'Şırnak', NULL ],
1070
+ 'TR74' => [ 'Bartın', 'Bartın', NULL ],
1071
+ 'TR75' => [ 'Ardahan', 'Ardahan', NULL ],
1072
+ 'TR76' => [ 'Iğdır', 'Iğdır', NULL ],
1073
+ 'TR77' => [ 'Yalova', 'Yalova', NULL ],
1074
+ 'TR78' => [ 'Karabük', 'Karabük', NULL ],
1075
+ 'TR79' => [ 'Kilis', 'Kilis', NULL ],
1076
+ 'TR80' => [ 'Osmaniye', 'Osmaniye', NULL ],
1077
+ 'TR81' => [ 'Düzce', 'Düzce', NULL ],
1078
+ ],
1079
+ // Tanzania.
1080
+ 'TZ' => [],
1081
+ // Uganda.
1082
+ 'UG' => [],
1083
+ // United States Minor Outlying Islands.
1084
+ 'UM' => [],
1085
+ // United States.
1086
+ 'US' => [
1087
+ 'AL' => [ 'AL', 'Alabama', NULL ],
1088
+ 'AK' => [ 'AK', 'Alaska', NULL ],
1089
+ 'AZ' => [ 'AZ', 'Arizona', NULL ],
1090
+ 'AR' => [ 'AR', 'Arkansas', NULL ],
1091
+ 'CA' => [ 'CA', 'California', NULL ],
1092
+ 'CO' => [ 'CO', 'Colorado', NULL ],
1093
+ 'CT' => [ 'CT', 'Connecticut', NULL ],
1094
+ 'DE' => [ 'DE', 'Delaware', NULL ],
1095
+ 'DC' => [ 'DC', 'District of Columbia', NULL ],
1096
+ 'FL' => [ 'FL', 'Florida', NULL ],
1097
+ 'GA' => [ 'GA', 'Georgia', NULL ],
1098
+ 'HI' => [ 'HI', 'Hawaii', NULL ],
1099
+ 'ID' => [ 'ID', 'Idaho', NULL ],
1100
+ 'IL' => [ 'IL', 'Illinois', NULL ],
1101
+ 'IN' => [ 'IN', 'Indiana', NULL ],
1102
+ 'IA' => [ 'IA', 'Iowa', NULL ],
1103
+ 'KS' => [ 'KS', 'Kansas', NULL ],
1104
+ 'KY' => [ 'KY', 'Kentucky', NULL ],
1105
+ 'LA' => [ 'LA', 'Louisiana', NULL ],
1106
+ 'ME' => [ 'ME', 'Maine', NULL ],
1107
+ 'MD' => [ 'MD', 'Maryland', NULL ],
1108
+ 'MA' => [ 'MA', 'Massachusetts', NULL ],
1109
+ 'MI' => [ 'MI', 'Michigan', NULL ],
1110
+ 'MN' => [ 'MN', 'Minnesota', NULL ],
1111
+ 'MS' => [ 'MS', 'Mississippi', NULL ],
1112
+ 'MO' => [ 'MO', 'Missouri', NULL ],
1113
+ 'MT' => [ 'MT', 'Montana', NULL ],
1114
+ 'NE' => [ 'NE', 'Nebraska', NULL ],
1115
+ 'NV' => [ 'NV', 'Nevada', NULL ],
1116
+ 'NH' => [ 'NH', 'New Hampshire', NULL ],
1117
+ 'NJ' => [ 'NJ', 'New Jersey', NULL ],
1118
+ 'NM' => [ 'NM', 'New Mexico', NULL ],
1119
+ 'NY' => [ 'NY', 'New York', NULL ],
1120
+ 'NC' => [ 'NC', 'North Carolina', NULL ],
1121
+ 'ND' => [ 'ND', 'North Dakota', NULL ],
1122
+ 'OH' => [ 'OH', 'Ohio', NULL ],
1123
+ 'OK' => [ 'OK', 'Oklahoma', NULL ],
1124
+ 'OR' => [ 'OR', 'Oregon', NULL ],
1125
+ 'PA' => [ 'PA', 'Pennsylvania', NULL ],
1126
+ 'RI' => [ 'RI', 'Rhode Island', NULL ],
1127
+ 'SC' => [ 'SC', 'South Carolina', NULL ],
1128
+ 'SD' => [ 'SD', 'South Dakota', NULL ],
1129
+ 'TN' => [ 'TN', 'Tennessee', NULL ],
1130
+ 'TX' => [ 'TX', 'Texas', NULL ],
1131
+ 'UT' => [ 'UT', 'Utah', NULL ],
1132
+ 'VT' => [ 'VT', 'Vermont', NULL ],
1133
+ 'VA' => [ 'VA', 'Virginia', NULL ],
1134
+ 'WA' => [ 'WA', 'Washington', NULL ],
1135
+ 'WV' => [ 'WV', 'West Virginia', NULL ],
1136
+ 'WI' => [ 'WI', 'Wisconsin', NULL ],
1137
+ 'WY' => [ 'WY', 'Wyoming', NULL ],
1138
+ 'AA' => [ 'AA', 'Armed Forces (AA)', NULL ],
1139
+ 'AE' => [ 'AE', 'Armed Forces (AE)', NULL ],
1140
+ 'AP' => [ 'AP', 'Armed Forces (AP)', NULL ],
1141
+ //[ 'AS', 'American Samoa', NULL ],
1142
+ //[ 'GU', 'Guam', NULL ],
1143
+ //[ 'MH', 'Marshall Islands', NULL ],
1144
+ //[ 'FM', 'Micronesia', NULL ],
1145
+ //[ 'MP', 'Northern Mariana Islands', NULL ],
1146
+ //[ 'PW', 'Palau', NULL ],
1147
+ //[ 'PR', 'Puerto Rico', NULL ],
1148
+ //[ 'VI', 'Virgin Islands', NULL ],
1149
+ ],
1150
+ // Vietnam.
1151
+ 'VN' => [],
1152
+ // Mayotte.
1153
+ 'YT' => [],
1154
+ // South Africa.
1155
+ 'ZA' => [],
1156
+ // Zambia.
1157
+ 'ZM' => [],
1158
+ ];
1159
+ // phpcs:enable
1160
+ }
includes/payment-methods/class-wc-stripe-payment-request.php CHANGED
@@ -98,6 +98,40 @@ class WC_Stripe_Payment_Request {
98
  $this->init();
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  /**
102
  * Checks if keys are set and valid.
103
  *
@@ -441,19 +475,23 @@ class WC_Stripe_Payment_Request {
441
  'booking',
442
  'bundle',
443
  'composite',
444
- 'mix-and-match',
445
  ]
446
  );
447
  }
448
 
449
  /**
450
- * Checks the cart to see if all items are allowed to used.
451
  *
452
  * @since 3.1.4
453
  * @version 4.0.0
454
  * @return boolean
455
  */
456
  public function allowed_items_in_cart() {
 
 
 
 
 
457
  foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
458
  $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
459
 
@@ -461,13 +499,13 @@ class WC_Stripe_Payment_Request {
461
  return false;
462
  }
463
 
464
- // Trial subscriptions with shipping are not supported
465
- if ( class_exists( 'WC_Subscriptions_Order' ) && WC_Subscriptions_Cart::cart_contains_subscription() && $_product->needs_shipping() && WC_Subscriptions_Product::get_trial_length( $_product ) > 0 ) {
466
  return false;
467
  }
468
 
469
- // Pre Orders compatbility where we don't support charge upon release.
470
- if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Cart::cart_contains_pre_order() && WC_Pre_Orders_Product::product_is_charged_upon_release( WC_Pre_Orders_Cart::get_pre_order_product() ) ) {
471
  return false;
472
  }
473
  }
@@ -645,9 +683,15 @@ class WC_Stripe_Payment_Request {
645
  * @return boolean
646
  */
647
  private function should_show_payment_button_on_cart() {
 
 
 
 
 
648
  if ( ! apply_filters( 'wc_stripe_show_payment_request_on_cart', true ) ) {
649
  return false;
650
  }
 
651
  if ( ! $this->allowed_items_in_cart() ) {
652
  WC_Stripe_Logger::log( 'Items in the cart has unsupported product type ( Payment Request button disabled )' );
653
  return false;
@@ -674,14 +718,28 @@ class WC_Stripe_Payment_Request {
674
  return false;
675
  }
676
 
677
- // Trial subscriptions with shipping are not supported
678
- if ( class_exists( 'WC_Subscriptions_Order' ) && $product->needs_shipping() && WC_Subscriptions_Product::get_trial_length( $product ) > 0 ) {
 
 
 
 
 
 
 
 
 
 
679
  return false;
680
  }
681
 
682
  // Pre Orders charge upon release not supported.
683
- if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Product::product_is_charged_upon_release( $product ) ) {
684
- WC_Stripe_Logger::log( 'Pre Order charge upon release is not supported. ( Payment Request button disabled )' );
 
 
 
 
685
  return false;
686
  }
687
 
@@ -1045,7 +1103,7 @@ class WC_Stripe_Payment_Request {
1045
  * Normalizes billing and shipping state fields.
1046
  *
1047
  * @since 4.0.0
1048
- * @version 5.0.0
1049
  */
1050
  public function normalize_state() {
1051
  $billing_country = ! empty( $_POST['billing_country'] ) ? wc_clean( wp_unslash( $_POST['billing_country'] ) ) : '';
@@ -1062,13 +1120,103 @@ class WC_Stripe_Payment_Request {
1062
  }
1063
  }
1064
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1065
  /**
1066
  * Gets the normalized state/county field because in some
1067
  * cases, the state/county field is formatted differently from
1068
  * what WC is expecting and throws an error. An example
1069
- * for Ireland the county dropdown in Chrome shows "Co. Clare" format.
1070
  *
1071
  * @since 5.0.0
 
1072
  *
1073
  * @param string $state Full state name or an already normalized abbreviation.
1074
  * @param string $country Two-letter country code.
@@ -1076,56 +1224,65 @@ class WC_Stripe_Payment_Request {
1076
  * @return string Normalized state abbreviation.
1077
  */
1078
  public function get_normalized_state( $state, $country ) {
1079
- $wc_valid_states = $country ? WC()->countries->get_states( $country ) : [];
 
 
 
1080
 
1081
- if ( $state && $country && is_array( $wc_valid_states ) && count( $wc_valid_states ) > 0 ) {
 
1082
 
1083
- // If it's already normalized, skip.
1084
- if ( in_array( $state, array_keys( $wc_valid_states ) ) ) {
1085
- return $state;
1086
- }
1087
 
1088
- $match_from_state_input = false;
1089
-
1090
- // China - Adapt dropdown values from Chrome and accept manually typed values like 云南.
1091
- // WC states: https://github.com/woocommerce/woocommerce/blob/master/i18n/states.php
1092
- if ( 'CN' === $country ) {
1093
- $replace_map = [
1094
- // Rename regions with different spelling.
1095
- 'Macau' => 'Macao',
1096
- 'Neimenggu' => 'Inner Mongolia',
1097
- 'Xizang' => 'Tibet',
1098
- // Remove suffixes.
1099
- 'Shi' => '',
1100
- 'Sheng' => '',
1101
- 'Zizhiqu' => '',
1102
- 'Huizuzizhiqu' => '',
1103
- 'Weiwuerzizhiqu' => '',
1104
- 'Zhuangzuzizhiqu' => '',
1105
- ];
1106
- $state = trim( str_replace( array_keys( $replace_map ), array_values( $replace_map ), $state ) );
1107
- $match_from_state_input = true;
1108
- }
1109
 
1110
- foreach ( $wc_valid_states as $wc_state_abbr => $wc_state_value ) {
1111
- // Match values either from WC states or from the state input.
1112
- if (
1113
- ( ! $match_from_state_input && preg_match( '/' . preg_quote( $wc_state_value, '/' ) . '/i', $state ) ) ||
1114
- ( $match_from_state_input && preg_match( '/' . preg_quote( $state, '/' ) . '/i', $wc_state_value ) )
1115
- ) {
1116
- return $wc_state_abbr;
1117
- }
1118
- }
 
 
 
 
 
 
 
 
1119
  }
1120
 
1121
- return $state;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1122
  }
1123
 
1124
  /**
1125
  * Create order. Security is handled by WC.
1126
  *
1127
  * @since 3.1.0
1128
- * @version 4.0.0
1129
  */
1130
  public function ajax_create_order() {
1131
  if ( WC()->cart->is_empty() ) {
@@ -1136,6 +1293,9 @@ class WC_Stripe_Payment_Request {
1136
  define( 'WOOCOMMERCE_CHECKOUT', true );
1137
  }
1138
 
 
 
 
1139
  // Normalizes billing and shipping state values.
1140
  $this->normalize_state();
1141
 
98
  $this->init();
99
  }
100
 
101
+ /**
102
+ * Checks whether authentication is required for checkout.
103
+ *
104
+ * @since 5.1.0
105
+ *
106
+ * @return bool
107
+ */
108
+ public function is_authentication_required() {
109
+ // If guest checkout is disabled, authentication might be required.
110
+ if ( 'no' === get_option( 'woocommerce_enable_guest_checkout', 'yes' ) ) {
111
+ // If account creation is not possible, authentication is required.
112
+ return ! $this->is_account_creation_possible();
113
+ }
114
+
115
+ return false;
116
+ }
117
+
118
+ /**
119
+ * Checks whether account creation is possible during checkout.
120
+ *
121
+ * @since 5.1.0
122
+ *
123
+ * @return bool
124
+ */
125
+ public function is_account_creation_possible() {
126
+ // If automatically generate username/password are disabled, the Payment Request API
127
+ // can't include any of those fields, so account creation is not possible.
128
+ return (
129
+ 'yes' === get_option( 'woocommerce_enable_signup_and_login_from_checkout', 'no' ) &&
130
+ 'yes' === get_option( 'woocommerce_registration_generate_username', 'yes' ) &&
131
+ 'yes' === get_option( 'woocommerce_registration_generate_password', 'yes' )
132
+ );
133
+ }
134
+
135
  /**
136
  * Checks if keys are set and valid.
137
  *
475
  'booking',
476
  'bundle',
477
  'composite',
 
478
  ]
479
  );
480
  }
481
 
482
  /**
483
+ * Checks the cart to see if all items are allowed to be used.
484
  *
485
  * @since 3.1.4
486
  * @version 4.0.0
487
  * @return boolean
488
  */
489
  public function allowed_items_in_cart() {
490
+ // Pre Orders compatibility where we don't support charge upon release.
491
+ if ( class_exists( 'WC_Pre_Orders_Cart' ) && WC_Pre_Orders_Cart::cart_contains_pre_order() && class_exists( 'WC_Pre_Orders_Product' ) && WC_Pre_Orders_Product::product_is_charged_upon_release( WC_Pre_Orders_Cart::get_pre_order_product() ) ) {
492
+ return false;
493
+ }
494
+
495
  foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
496
  $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
497
 
499
  return false;
500
  }
501
 
502
+ // Not supported for subscription products when user is not authenticated and account creation is not possible.
503
+ if ( class_exists( 'WC_Subscriptions_Product' ) && WC_Subscriptions_Product::is_subscription( $_product ) && ! is_user_logged_in() && ! $this->is_account_creation_possible() ) {
504
  return false;
505
  }
506
 
507
+ // Trial subscriptions with shipping are not supported.
508
+ if ( class_exists( 'WC_Subscriptions_Product' ) && WC_Subscriptions_Product::is_subscription( $_product ) && $_product->needs_shipping() && WC_Subscriptions_Product::get_trial_length( $_product ) > 0 ) {
509
  return false;
510
  }
511
  }
683
  * @return boolean
684
  */
685
  private function should_show_payment_button_on_cart() {
686
+ // Not supported when user isn't authenticated and authentication is required.
687
+ if ( ! is_user_logged_in() && $this->is_authentication_required() ) {
688
+ return false;
689
+ }
690
+
691
  if ( ! apply_filters( 'wc_stripe_show_payment_request_on_cart', true ) ) {
692
  return false;
693
  }
694
+
695
  if ( ! $this->allowed_items_in_cart() ) {
696
  WC_Stripe_Logger::log( 'Items in the cart has unsupported product type ( Payment Request button disabled )' );
697
  return false;
718
  return false;
719
  }
720
 
721
+ // Not supported when user isn't authenticated and authentication is required.
722
+ if ( ! is_user_logged_in() && $this->is_authentication_required() ) {
723
+ return false;
724
+ }
725
+
726
+ // Not supported for subscription products when user is not authenticated and account creation is not possible.
727
+ if ( class_exists( 'WC_Subscriptions_Product' ) && WC_Subscriptions_Product::is_subscription( $product ) && ! is_user_logged_in() && ! $this->is_account_creation_possible() ) {
728
+ return false;
729
+ }
730
+
731
+ // Trial subscriptions with shipping are not supported.
732
+ if ( class_exists( 'WC_Subscriptions_Product' ) && $product->needs_shipping() && WC_Subscriptions_Product::get_trial_length( $product ) > 0 ) {
733
  return false;
734
  }
735
 
736
  // Pre Orders charge upon release not supported.
737
+ if ( class_exists( 'WC_Pre_Orders_Product' ) && WC_Pre_Orders_Product::product_is_charged_upon_release( $product ) ) {
738
+ return false;
739
+ }
740
+
741
+ // Composite products are not supported on the product page.
742
+ if ( class_exists( 'WC_Composite_Products' ) && function_exists( 'is_composite_product' ) && is_composite_product() ) {
743
  return false;
744
  }
745
 
1103
  * Normalizes billing and shipping state fields.
1104
  *
1105
  * @since 4.0.0
1106
+ * @version 5.1.0
1107
  */
1108
  public function normalize_state() {
1109
  $billing_country = ! empty( $_POST['billing_country'] ) ? wc_clean( wp_unslash( $_POST['billing_country'] ) ) : '';
1120
  }
1121
  }
1122
 
1123
+ /**
1124
+ * Checks if given state is normalized.
1125
+ *
1126
+ * @since 5.1.0
1127
+ *
1128
+ * @param string $state State.
1129
+ * @param string $country Two-letter country code.
1130
+ *
1131
+ * @return bool Whether state is normalized or not.
1132
+ */
1133
+ public function is_normalized_state( $state, $country ) {
1134
+ $wc_states = WC()->countries->get_states( $country );
1135
+ return (
1136
+ is_array( $wc_states ) &&
1137
+ in_array( $state, array_keys( $wc_states ), true )
1138
+ );
1139
+ }
1140
+
1141
+ /**
1142
+ * Sanitize string for comparison.
1143
+ *
1144
+ * @since 5.1.0
1145
+ *
1146
+ * @param string $string String to be sanitized.
1147
+ *
1148
+ * @return string The sanitized string.
1149
+ */
1150
+ public function sanitize_string( $string ) {
1151
+ return trim( wc_strtolower( remove_accents( $string ) ) );
1152
+ }
1153
+
1154
+ /**
1155
+ * Get normalized state from Payment Request API dropdown list of states.
1156
+ *
1157
+ * @since 5.1.0
1158
+ *
1159
+ * @param string $state Full state name or state code.
1160
+ * @param string $country Two-letter country code.
1161
+ *
1162
+ * @return string Normalized state or original state input value.
1163
+ */
1164
+ public function get_normalized_state_from_pr_states( $state, $country ) {
1165
+ // Include Payment Request API State list for compatibility with WC countries/states.
1166
+ include_once WC_STRIPE_PLUGIN_PATH . '/includes/constants/class-wc-stripe-payment-request-button-states.php';
1167
+ $pr_states = WC_Stripe_Payment_Request_Button_States::STATES;
1168
+
1169
+ if ( ! isset( $pr_states[ $country ] ) ) {
1170
+ return $state;
1171
+ }
1172
+
1173
+ foreach ( $pr_states[ $country ] as $wc_state_abbr => $pr_state ) {
1174
+ $sanitized_state_string = $this->sanitize_string( $state );
1175
+ // Checks if input state matches with Payment Request state code (0), name (1) or localName (2).
1176
+ if (
1177
+ ( ! empty( $pr_state[0] ) && $sanitized_state_string === $this->sanitize_string( $pr_state[0] ) ) ||
1178
+ ( ! empty( $pr_state[1] ) && $sanitized_state_string === $this->sanitize_string( $pr_state[1] ) ) ||
1179
+ ( ! empty( $pr_state[2] ) && $sanitized_state_string === $this->sanitize_string( $pr_state[2] ) )
1180
+ ) {
1181
+ return $wc_state_abbr;
1182
+ }
1183
+ }
1184
+
1185
+ return $state;
1186
+ }
1187
+
1188
+ /**
1189
+ * Get normalized state from WooCommerce list of translated states.
1190
+ *
1191
+ * @since 5.1.0
1192
+ *
1193
+ * @param string $state Full state name or state code.
1194
+ * @param string $country Two-letter country code.
1195
+ *
1196
+ * @return string Normalized state or original state input value.
1197
+ */
1198
+ public function get_normalized_state_from_wc_states( $state, $country ) {
1199
+ $wc_states = WC()->countries->get_states( $country );
1200
+
1201
+ if ( is_array( $wc_states ) ) {
1202
+ foreach ( $wc_states as $wc_state_abbr => $wc_state_value ) {
1203
+ if ( preg_match( '/' . preg_quote( $wc_state_value, '/' ) . '/i', $state ) ) {
1204
+ return $wc_state_abbr;
1205
+ }
1206
+ }
1207
+ }
1208
+
1209
+ return $state;
1210
+ }
1211
+
1212
  /**
1213
  * Gets the normalized state/county field because in some
1214
  * cases, the state/county field is formatted differently from
1215
  * what WC is expecting and throws an error. An example
1216
+ * for Ireland, the county dropdown in Chrome shows "Co. Clare" format.
1217
  *
1218
  * @since 5.0.0
1219
+ * @version 5.1.0
1220
  *
1221
  * @param string $state Full state name or an already normalized abbreviation.
1222
  * @param string $country Two-letter country code.
1224
  * @return string Normalized state abbreviation.
1225
  */
1226
  public function get_normalized_state( $state, $country ) {
1227
+ // If it's empty or already normalized, skip.
1228
+ if ( ! $state || $this->is_normalized_state( $state, $country ) ) {
1229
+ return $state;
1230
+ }
1231
 
1232
+ // Try to match state from the Payment Request API list of states.
1233
+ $state = $this->get_normalized_state_from_pr_states( $state, $country );
1234
 
1235
+ // If it's normalized, return.
1236
+ if ( $this->is_normalized_state( $state, $country ) ) {
1237
+ return $state;
1238
+ }
1239
 
1240
+ // If the above doesn't work, fallback to matching against the list of translated
1241
+ // states from WooCommerce.
1242
+ return $this->get_normalized_state_from_wc_states( $state, $country );
1243
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1244
 
1245
+ /**
1246
+ * The Payment Request API provides its own validation for the address form.
1247
+ * For some countries, it might not provide a state field, so we need to return a more descriptive
1248
+ * error message, indicating that the Payment Request button is not supported for that country.
1249
+ *
1250
+ * @since 5.1.0
1251
+ */
1252
+ public function validate_state() {
1253
+ $wc_checkout = WC_Checkout::instance();
1254
+ $posted_data = $wc_checkout->get_posted_data();
1255
+ $checkout_fields = $wc_checkout->get_checkout_fields();
1256
+ $countries = WC()->countries->get_countries();
1257
+
1258
+ $is_supported = true;
1259
+ // Checks if billing state is missing and is required.
1260
+ if ( ! empty( $checkout_fields['billing']['billing_state']['required'] ) && '' === $posted_data['billing_state'] ) {
1261
+ $is_supported = false;
1262
  }
1263
 
1264
+ // Checks if shipping state is missing and is required.
1265
+ if ( WC()->cart->needs_shipping_address() && ! empty( $checkout_fields['shipping']['shipping_state']['required'] ) && '' === $posted_data['shipping_state'] ) {
1266
+ $is_supported = false;
1267
+ }
1268
+
1269
+ if ( ! $is_supported ) {
1270
+ wc_add_notice(
1271
+ sprintf(
1272
+ /* translators: %s: country. */
1273
+ __( 'The Payment Request button is not supported in %s because some required fields couldn\'t be verified. Please proceed to the checkout page and try again.', 'woocommerce-gateway-stripe' ),
1274
+ isset( $countries[ $posted_data['billing_country'] ] ) ? $countries[ $posted_data['billing_country'] ] : $posted_data['billing_country']
1275
+ ),
1276
+ 'error'
1277
+ );
1278
+ }
1279
  }
1280
 
1281
  /**
1282
  * Create order. Security is handled by WC.
1283
  *
1284
  * @since 3.1.0
1285
+ * @version 5.1.0
1286
  */
1287
  public function ajax_create_order() {
1288
  if ( WC()->cart->is_empty() ) {
1293
  define( 'WOOCOMMERCE_CHECKOUT', true );
1294
  }
1295
 
1296
+ // In case the state is required, but is missing, add a more descriptive error notice.
1297
+ $this->validate_state();
1298
+
1299
  // Normalizes billing and shipping state values.
1300
  $this->normalize_state();
1301
 
languages/woocommerce-gateway-stripe.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the WooCommerce Stripe Gateway package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Stripe Gateway 5.0.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
- "POT-Creation-Date: 2021-03-17 14:10:37+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -1708,58 +1708,66 @@ msgstr ""
1708
  msgid "Stripe SOFORT"
1709
  msgstr ""
1710
 
1711
- #: includes/payment-methods/class-wc-stripe-payment-request.php:303
1712
- #: includes/payment-methods/class-wc-stripe-payment-request.php:960
1713
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1285
1714
  msgid "Tax"
1715
  msgstr ""
1716
 
1717
- #: includes/payment-methods/class-wc-stripe-payment-request.php:311
1718
- #: includes/payment-methods/class-wc-stripe-payment-request.php:968
1719
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1292
1720
  msgid "Shipping"
1721
  msgstr ""
1722
 
1723
- #: includes/payment-methods/class-wc-stripe-payment-request.php:318
1724
- #: includes/payment-methods/class-wc-stripe-payment-request.php:975
1725
  msgid "Pending"
1726
  msgstr ""
1727
 
1728
- #: includes/payment-methods/class-wc-stripe-payment-request.php:524
1729
  msgid "Sorry, we're not accepting prepaid cards at this time."
1730
  msgstr ""
1731
 
1732
- #: includes/payment-methods/class-wc-stripe-payment-request.php:526
1733
  #. translators: Do not translate the [option] placeholder
1734
  msgid "Unknown shipping option \"[option]\"."
1735
  msgstr ""
1736
 
1737
- #: includes/payment-methods/class-wc-stripe-payment-request.php:637
1738
  msgid "OR"
1739
  msgstr ""
1740
 
1741
- #: includes/payment-methods/class-wc-stripe-payment-request.php:809
1742
- #: includes/payment-methods/class-wc-stripe-payment-request.php:822
1743
  msgid "Unable to find shipping method for address."
1744
  msgstr ""
1745
 
1746
- #: includes/payment-methods/class-wc-stripe-payment-request.php:922
1747
  #. translators: %d is the product Id
1748
  msgid "Product with the ID (%d) cannot be found."
1749
  msgstr ""
1750
 
1751
- #: includes/payment-methods/class-wc-stripe-payment-request.php:943
1752
  #. translators: 1: product name 2: quantity in stock
1753
  msgid ""
1754
  "You cannot add that amount of \"%1$s\"; to the cart because there is not "
1755
  "enough stock (%2$s remaining)."
1756
  msgstr ""
1757
 
1758
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1132
 
 
 
 
 
 
 
 
1759
  msgid "Empty cart"
1760
  msgstr ""
1761
 
1762
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1299
1763
  msgid "Discount"
1764
  msgstr ""
1765
 
2
  # This file is distributed under the same license as the WooCommerce Stripe Gateway package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Stripe Gateway 5.1.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
+ "POT-Creation-Date: 2021-04-07 19:43:23+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
1708
  msgid "Stripe SOFORT"
1709
  msgstr ""
1710
 
1711
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:337
1712
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1018
1713
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1445
1714
  msgid "Tax"
1715
  msgstr ""
1716
 
1717
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:345
1718
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1026
1719
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1452
1720
  msgid "Shipping"
1721
  msgstr ""
1722
 
1723
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:352
1724
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1033
1725
  msgid "Pending"
1726
  msgstr ""
1727
 
1728
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:562
1729
  msgid "Sorry, we're not accepting prepaid cards at this time."
1730
  msgstr ""
1731
 
1732
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:564
1733
  #. translators: Do not translate the [option] placeholder
1734
  msgid "Unknown shipping option \"[option]\"."
1735
  msgstr ""
1736
 
1737
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:675
1738
  msgid "OR"
1739
  msgstr ""
1740
 
1741
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:867
1742
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:880
1743
  msgid "Unable to find shipping method for address."
1744
  msgstr ""
1745
 
1746
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:980
1747
  #. translators: %d is the product Id
1748
  msgid "Product with the ID (%d) cannot be found."
1749
  msgstr ""
1750
 
1751
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1001
1752
  #. translators: 1: product name 2: quantity in stock
1753
  msgid ""
1754
  "You cannot add that amount of \"%1$s\"; to the cart because there is not "
1755
  "enough stock (%2$s remaining)."
1756
  msgstr ""
1757
 
1758
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1273
1759
+ #. translators: %s: country.
1760
+ msgid ""
1761
+ "The Payment Request button is not supported in %s because some required "
1762
+ "fields couldn't be verified. Please proceed to the checkout page and try "
1763
+ "again."
1764
+ msgstr ""
1765
+
1766
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1289
1767
  msgid "Empty cart"
1768
  msgstr ""
1769
 
1770
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1459
1771
  msgid "Discount"
1772
  msgstr ""
1773
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort,
4
  Requires at least: 4.4
5
  Tested up to: 5.6
6
  Requires PHP: 5.6
7
- Stable tag: 5.0.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
  Attributions: thorsten-stripe
@@ -126,12 +126,10 @@ If you get stuck, you can ask for help in the Plugin Forum.
126
 
127
  == Changelog ==
128
 
129
- = 5.0.0 - 2021-03-17 =
130
 
131
- * Add - Display time of last Stripe webhook in settings.
132
- * Add - wc_stripe_webhook_validate_user_agent filter to customize webhook user-agent validation.
133
- * Fix - Payment Request Buttons for Chinese provinces in Chrome.
134
- * Fix - Enable wc_stripe_send_stripe_receipt filter to send Stripe emails.
135
- * Fix - Check for more errors when attaching sources to customers.
136
 
137
  [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).
4
  Requires at least: 4.4
5
  Tested up to: 5.6
6
  Requires PHP: 5.6
7
+ Stable tag: 5.1.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
  Attributions: thorsten-stripe
126
 
127
  == Changelog ==
128
 
129
+ = 5.1.0 - 2021-04-07 =
130
 
131
+ * Fix - Don't attempt to submit level 3 data for non-US merchants.
132
+ * Fix - Hide Payment Request Buttons when guest checkout is disabled.
133
+ * Fix - Match Payment Request states with WooCommerce states.
 
 
134
 
135
  [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).
woocommerce-gateway-stripe.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Take credit card payments on your store using Stripe.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com/
8
- * Version: 5.0.0
9
  * Requires at least: 4.4
10
  * Tested up to: 5.6
11
  * WC requires at least: 3.0
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
21
  /**
22
  * Required minimums and constants
23
  */
24
- define( 'WC_STRIPE_VERSION', '5.0.0' ); // WRCS: DEFINED_VERSION.
25
  define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
26
  define( 'WC_STRIPE_MIN_WC_VER', '3.0' );
27
  define( 'WC_STRIPE_FUTURE_MIN_WC_VER', '3.3' );
5
  * Description: Take credit card payments on your store using Stripe.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com/
8
+ * Version: 5.1.0
9
  * Requires at least: 4.4
10
  * Tested up to: 5.6
11
  * WC requires at least: 3.0
21
  /**
22
  * Required minimums and constants
23
  */
24
+ define( 'WC_STRIPE_VERSION', '5.1.0' ); // WRCS: DEFINED_VERSION.
25
  define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
26
  define( 'WC_STRIPE_MIN_WC_VER', '3.0' );
27
  define( 'WC_STRIPE_FUTURE_MIN_WC_VER', '3.3' );