Test Failed
Pull Request — master (#1937)
by
unknown
05:41
created

country-functions.php ➔ give_get_states()   B

Complexity

Conditions 3
Paths 4

Size

Total Lines 25
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
cc 3
eloc 8
nc 4
nop 1
dl 0
loc 25
ccs 0
cts 19
cp 0
crap 12
rs 8.8571
c 0
b 0
f 0
1
<?php
2
/**
3
 * Country Functions
4
 *
5
 * @package     Give
6
 * @subpackage  Functions
7
 * @copyright   Copyright (c) 2016, WordImpress
8
 * @license     https://opensource.org/licenses/gpl-license GNU Public License
9
 * @since       1.0
10
 */
11
12
// Exit if accessed directly.
13
if ( ! defined( 'ABSPATH' ) ) {
14
	exit;
15
}
16
17
/**
18
 * Get Shop Base Country
19
 *
20
 * @since 1.0
21
 * @return string $country The two letter country code for the shop's base country
22
 */
23
function give_get_country() {
24
	$give_options = give_get_settings();
25
	$country      = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US';
26
27
	return apply_filters( 'give_give_country', $country );
28
}
29
30
/**
31
 * Get Shop Base State
32
 *
33
 * @since 1.0
34
 * @return string $state The shop's base state name
35
 */
36
function give_get_state() {
37
	$give_options = give_get_settings();
38
	$state        = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false;
39
40
	return apply_filters( 'give_give_state', $state );
41
}
42
43
/**
44
 * Get Shop States
45
 *
46
 * @since 1.0
47
 *
48
 * @param null $country
49
 *
50
 * @return mixed|void  A list of states for the shop's base country
51
 */
52
function give_get_states( $country = null ) {
53
	// If Country have no states return empty array.
54
	$states = array();
55
56
	// Check if Country Code is empty or not.
57
	if ( empty( $country ) ) {
58
		// Get defalut country code that is being set by the admin.
59
		$country = give_get_country();
60
	}
61
62
	// Get all the list of the states in array key format where key is the country code and value is the states that it contain.
63
	$states_list = give_states_list();
64
65
	// Check if $country code exists in the array key.
66
	if ( array_key_exists( $country, $states_list ) ) {
67
		$states = $states_list[ $country ];
68
	}
69
70
	/**
71
	 * Filter the query in case tables are non-standard.
72
	 *
73
	 * @param string $query Database count query
74
	 */
75
	return (array) apply_filters( 'give_give_states', $states );
76
}
77
78
/**
79
 * Get Country List
80
 *
81
 * @since 1.0
82
 * @return array $countries A list of the available countries
83
 */
84
function give_get_country_list() {
85
	$countries = array(
86
		''   => '',
87
		'US' => esc_html__( 'United States', 'give' ),
88
		'CA' => esc_html__( 'Canada', 'give' ),
89
		'GB' => esc_html__( 'United Kingdom', 'give' ),
90
		'AF' => esc_html__( 'Afghanistan', 'give' ),
91
		'AL' => esc_html__( 'Albania', 'give' ),
92
		'DZ' => esc_html__( 'Algeria', 'give' ),
93
		'AS' => esc_html__( 'American Samoa', 'give' ),
94
		'AD' => esc_html__( 'Andorra', 'give' ),
95
		'AO' => esc_html__( 'Angola', 'give' ),
96
		'AI' => esc_html__( 'Anguilla', 'give' ),
97
		'AQ' => esc_html__( 'Antarctica', 'give' ),
98
		'AG' => esc_html__( 'Antigua and Barbuda', 'give' ),
99
		'AR' => esc_html__( 'Argentina', 'give' ),
100
		'AM' => esc_html__( 'Armenia', 'give' ),
101
		'AW' => esc_html__( 'Aruba', 'give' ),
102
		'AU' => esc_html__( 'Australia', 'give' ),
103
		'AT' => esc_html__( 'Austria', 'give' ),
104
		'AZ' => esc_html__( 'Azerbaijan', 'give' ),
105
		'BS' => esc_html__( 'Bahamas', 'give' ),
106
		'BH' => esc_html__( 'Bahrain', 'give' ),
107
		'BD' => esc_html__( 'Bangladesh', 'give' ),
108
		'BB' => esc_html__( 'Barbados', 'give' ),
109
		'BY' => esc_html__( 'Belarus', 'give' ),
110
		'BE' => esc_html__( 'Belgium', 'give' ),
111
		'BZ' => esc_html__( 'Belize', 'give' ),
112
		'BJ' => esc_html__( 'Benin', 'give' ),
113
		'BM' => esc_html__( 'Bermuda', 'give' ),
114
		'BT' => esc_html__( 'Bhutan', 'give' ),
115
		'BO' => esc_html__( 'Bolivia', 'give' ),
116
		'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ),
117
		'BW' => esc_html__( 'Botswana', 'give' ),
118
		'BV' => esc_html__( 'Bouvet Island', 'give' ),
119
		'BR' => esc_html__( 'Brazil', 'give' ),
120
		'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ),
121
		'BN' => esc_html__( 'Brunei Darrussalam', 'give' ),
122
		'BG' => esc_html__( 'Bulgaria', 'give' ),
123
		'BF' => esc_html__( 'Burkina Faso', 'give' ),
124
		'BI' => esc_html__( 'Burundi', 'give' ),
125
		'KH' => esc_html__( 'Cambodia', 'give' ),
126
		'CM' => esc_html__( 'Cameroon', 'give' ),
127
		'CV' => esc_html__( 'Cape Verde', 'give' ),
128
		'KY' => esc_html__( 'Cayman Islands', 'give' ),
129
		'CF' => esc_html__( 'Central African Republic', 'give' ),
130
		'TD' => esc_html__( 'Chad', 'give' ),
131
		'CL' => esc_html__( 'Chile', 'give' ),
132
		'CN' => esc_html__( 'China', 'give' ),
133
		'CX' => esc_html__( 'Christmas Island', 'give' ),
134
		'CC' => esc_html__( 'Cocos Islands', 'give' ),
135
		'CO' => esc_html__( 'Colombia', 'give' ),
136
		'KM' => esc_html__( 'Comoros', 'give' ),
137
		'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ),
138
		'CG' => esc_html__( 'Congo, Republic of', 'give' ),
139
		'CK' => esc_html__( 'Cook Islands', 'give' ),
140
		'CR' => esc_html__( 'Costa Rica', 'give' ),
141
		'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ),
142
		'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ),
143
		'CU' => esc_html__( 'Cuba', 'give' ),
144
		'CY' => esc_html__( 'Cyprus Island', 'give' ),
145
		'CZ' => esc_html__( 'Czech Republic', 'give' ),
146
		'DK' => esc_html__( 'Denmark', 'give' ),
147
		'DJ' => esc_html__( 'Djibouti', 'give' ),
148
		'DM' => esc_html__( 'Dominica', 'give' ),
149
		'DO' => esc_html__( 'Dominican Republic', 'give' ),
150
		'TP' => esc_html__( 'East Timor', 'give' ),
151
		'EC' => esc_html__( 'Ecuador', 'give' ),
152
		'EG' => esc_html__( 'Egypt', 'give' ),
153
		'GQ' => esc_html__( 'Equatorial Guinea', 'give' ),
154
		'SV' => esc_html__( 'El Salvador', 'give' ),
155
		'ER' => esc_html__( 'Eritrea', 'give' ),
156
		'EE' => esc_html__( 'Estonia', 'give' ),
157
		'ET' => esc_html__( 'Ethiopia', 'give' ),
158
		'FK' => esc_html__( 'Falkland Islands', 'give' ),
159
		'FO' => esc_html__( 'Faroe Islands', 'give' ),
160
		'FJ' => esc_html__( 'Fiji', 'give' ),
161
		'FI' => esc_html__( 'Finland', 'give' ),
162
		'FR' => esc_html__( 'France', 'give' ),
163
		'GF' => esc_html__( 'French Guiana', 'give' ),
164
		'PF' => esc_html__( 'French Polynesia', 'give' ),
165
		'TF' => esc_html__( 'French Southern Territories', 'give' ),
166
		'GA' => esc_html__( 'Gabon', 'give' ),
167
		'GM' => esc_html__( 'Gambia', 'give' ),
168
		'GE' => esc_html__( 'Georgia', 'give' ),
169
		'DE' => esc_html__( 'Germany', 'give' ),
170
		'GR' => esc_html__( 'Greece', 'give' ),
171
		'GH' => esc_html__( 'Ghana', 'give' ),
172
		'GI' => esc_html__( 'Gibraltar', 'give' ),
173
		'GL' => esc_html__( 'Greenland', 'give' ),
174
		'GD' => esc_html__( 'Grenada', 'give' ),
175
		'GP' => esc_html__( 'Guadeloupe', 'give' ),
176
		'GU' => esc_html__( 'Guam', 'give' ),
177
		'GT' => esc_html__( 'Guatemala', 'give' ),
178
		'GG' => esc_html__( 'Guernsey', 'give' ),
179
		'GN' => esc_html__( 'Guinea', 'give' ),
180
		'GW' => esc_html__( 'Guinea-Bissau', 'give' ),
181
		'GY' => esc_html__( 'Guyana', 'give' ),
182
		'HT' => esc_html__( 'Haiti', 'give' ),
183
		'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ),
184
		'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ),
185
		'HN' => esc_html__( 'Honduras', 'give' ),
186
		'HK' => esc_html__( 'Hong Kong', 'give' ),
187
		'HU' => esc_html__( 'Hungary', 'give' ),
188
		'IS' => esc_html__( 'Iceland', 'give' ),
189
		'IN' => esc_html__( 'India', 'give' ),
190
		'ID' => esc_html__( 'Indonesia', 'give' ),
191
		'IR' => esc_html__( 'Iran', 'give' ),
192
		'IQ' => esc_html__( 'Iraq', 'give' ),
193
		'IE' => esc_html__( 'Ireland', 'give' ),
194
		'IM' => esc_html__( 'Isle of Man', 'give' ),
195
		'IL' => esc_html__( 'Israel', 'give' ),
196
		'IT' => esc_html__( 'Italy', 'give' ),
197
		'JM' => esc_html__( 'Jamaica', 'give' ),
198
		'JP' => esc_html__( 'Japan', 'give' ),
199
		'JE' => esc_html__( 'Jersey', 'give' ),
200
		'JO' => esc_html__( 'Jordan', 'give' ),
201
		'KZ' => esc_html__( 'Kazakhstan', 'give' ),
202
		'KE' => esc_html__( 'Kenya', 'give' ),
203
		'KI' => esc_html__( 'Kiribati', 'give' ),
204
		'KW' => esc_html__( 'Kuwait', 'give' ),
205
		'KG' => esc_html__( 'Kyrgyzstan', 'give' ),
206
		'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ),
207
		'LV' => esc_html__( 'Latvia', 'give' ),
208
		'LB' => esc_html__( 'Lebanon', 'give' ),
209
		'LS' => esc_html__( 'Lesotho', 'give' ),
210
		'LR' => esc_html__( 'Liberia', 'give' ),
211
		'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ),
212
		'LI' => esc_html__( 'Liechtenstein', 'give' ),
213
		'LT' => esc_html__( 'Lithuania', 'give' ),
214
		'LU' => esc_html__( 'Luxembourg', 'give' ),
215
		'MO' => esc_html__( 'Macau', 'give' ),
216
		'MK' => esc_html__( 'Macedonia', 'give' ),
217
		'MG' => esc_html__( 'Madagascar', 'give' ),
218
		'MW' => esc_html__( 'Malawi', 'give' ),
219
		'MY' => esc_html__( 'Malaysia', 'give' ),
220
		'MV' => esc_html__( 'Maldives', 'give' ),
221
		'ML' => esc_html__( 'Mali', 'give' ),
222
		'MT' => esc_html__( 'Malta', 'give' ),
223
		'MH' => esc_html__( 'Marshall Islands', 'give' ),
224
		'MQ' => esc_html__( 'Martinique', 'give' ),
225
		'MR' => esc_html__( 'Mauritania', 'give' ),
226
		'MU' => esc_html__( 'Mauritius', 'give' ),
227
		'YT' => esc_html__( 'Mayotte', 'give' ),
228
		'MX' => esc_html__( 'Mexico', 'give' ),
229
		'FM' => esc_html__( 'Micronesia', 'give' ),
230
		'MD' => esc_html__( 'Moldova, Republic of', 'give' ),
231
		'MC' => esc_html__( 'Monaco', 'give' ),
232
		'MN' => esc_html__( 'Mongolia', 'give' ),
233
		'ME' => esc_html__( 'Montenegro', 'give' ),
234
		'MS' => esc_html__( 'Montserrat', 'give' ),
235
		'MA' => esc_html__( 'Morocco', 'give' ),
236
		'MZ' => esc_html__( 'Mozambique', 'give' ),
237
		'MM' => esc_html__( 'Myanmar', 'give' ),
238
		'NA' => esc_html__( 'Namibia', 'give' ),
239
		'NR' => esc_html__( 'Nauru', 'give' ),
240
		'NP' => esc_html__( 'Nepal', 'give' ),
241
		'NL' => esc_html__( 'Netherlands', 'give' ),
242
		'AN' => esc_html__( 'Netherlands Antilles', 'give' ),
243
		'NC' => esc_html__( 'New Caledonia', 'give' ),
244
		'NZ' => esc_html__( 'New Zealand', 'give' ),
245
		'NI' => esc_html__( 'Nicaragua', 'give' ),
246
		'NE' => esc_html__( 'Niger', 'give' ),
247
		'NG' => esc_html__( 'Nigeria', 'give' ),
248
		'NU' => esc_html__( 'Niue', 'give' ),
249
		'NF' => esc_html__( 'Norfolk Island', 'give' ),
250
		'KP' => esc_html__( 'North Korea', 'give' ),
251
		'MP' => esc_html__( 'Northern Mariana Islands', 'give' ),
252
		'NO' => esc_html__( 'Norway', 'give' ),
253
		'OM' => esc_html__( 'Oman', 'give' ),
254
		'PK' => esc_html__( 'Pakistan', 'give' ),
255
		'PW' => esc_html__( 'Palau', 'give' ),
256
		'PS' => esc_html__( 'Palestinian Territories', 'give' ),
257
		'PA' => esc_html__( 'Panama', 'give' ),
258
		'PG' => esc_html__( 'Papua New Guinea', 'give' ),
259
		'PY' => esc_html__( 'Paraguay', 'give' ),
260
		'PE' => esc_html__( 'Peru', 'give' ),
261
		'PH' => esc_html__( 'Phillipines', 'give' ),
262
		'PN' => esc_html__( 'Pitcairn Island', 'give' ),
263
		'PL' => esc_html__( 'Poland', 'give' ),
264
		'PT' => esc_html__( 'Portugal', 'give' ),
265
		'PR' => esc_html__( 'Puerto Rico', 'give' ),
266
		'QA' => esc_html__( 'Qatar', 'give' ),
267
		'RE' => esc_html__( 'Reunion Island', 'give' ),
268
		'RO' => esc_html__( 'Romania', 'give' ),
269
		'RU' => esc_html__( 'Russian Federation', 'give' ),
270
		'RW' => esc_html__( 'Rwanda', 'give' ),
271
		'SH' => esc_html__( 'Saint Helena', 'give' ),
272
		'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ),
273
		'LC' => esc_html__( 'Saint Lucia', 'give' ),
274
		'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ),
275
		'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ),
276
		'SM' => esc_html__( 'San Marino', 'give' ),
277
		'ST' => esc_html__( 'Sao Tome and Principe', 'give' ),
278
		'SA' => esc_html__( 'Saudi Arabia', 'give' ),
279
		'SN' => esc_html__( 'Senegal', 'give' ),
280
		'RS' => esc_html__( 'Serbia', 'give' ),
281
		'SC' => esc_html__( 'Seychelles', 'give' ),
282
		'SL' => esc_html__( 'Sierra Leone', 'give' ),
283
		'SG' => esc_html__( 'Singapore', 'give' ),
284
		'SK' => esc_html__( 'Slovak Republic', 'give' ),
285
		'SI' => esc_html__( 'Slovenia', 'give' ),
286
		'SB' => esc_html__( 'Solomon Islands', 'give' ),
287
		'SO' => esc_html__( 'Somalia', 'give' ),
288
		'ZA' => esc_html__( 'South Africa', 'give' ),
289
		'GS' => esc_html__( 'South Georgia', 'give' ),
290
		'KR' => esc_html__( 'South Korea', 'give' ),
291
		'ES' => esc_html__( 'Spain', 'give' ),
292
		'LK' => esc_html__( 'Sri Lanka', 'give' ),
293
		'SD' => esc_html__( 'Sudan', 'give' ),
294
		'SR' => esc_html__( 'Suriname', 'give' ),
295
		'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ),
296
		'SZ' => esc_html__( 'Swaziland', 'give' ),
297
		'SE' => esc_html__( 'Sweden', 'give' ),
298
		'CH' => esc_html__( 'Switzerland', 'give' ),
299
		'SY' => esc_html__( 'Syrian Arab Republic', 'give' ),
300
		'TW' => esc_html__( 'Taiwan', 'give' ),
301
		'TJ' => esc_html__( 'Tajikistan', 'give' ),
302
		'TZ' => esc_html__( 'Tanzania', 'give' ),
303
		'TG' => esc_html__( 'Togo', 'give' ),
304
		'TK' => esc_html__( 'Tokelau', 'give' ),
305
		'TO' => esc_html__( 'Tonga', 'give' ),
306
		'TH' => esc_html__( 'Thailand', 'give' ),
307
		'TT' => esc_html__( 'Trinidad and Tobago', 'give' ),
308
		'TN' => esc_html__( 'Tunisia', 'give' ),
309
		'TR' => esc_html__( 'Turkey', 'give' ),
310
		'TM' => esc_html__( 'Turkmenistan', 'give' ),
311
		'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ),
312
		'TV' => esc_html__( 'Tuvalu', 'give' ),
313
		'UG' => esc_html__( 'Uganda', 'give' ),
314
		'UA' => esc_html__( 'Ukraine', 'give' ),
315
		'AE' => esc_html__( 'United Arab Emirates', 'give' ),
316
		'UY' => esc_html__( 'Uruguay', 'give' ),
317
		'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ),
318
		'UZ' => esc_html__( 'Uzbekistan', 'give' ),
319
		'VU' => esc_html__( 'Vanuatu', 'give' ),
320
		'VE' => esc_html__( 'Venezuela', 'give' ),
321
		'VN' => esc_html__( 'Vietnam', 'give' ),
322
		'VG' => esc_html__( 'Virgin Islands (British)', 'give' ),
323
		'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ),
324
		'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ),
325
		'EH' => esc_html__( 'Western Sahara', 'give' ),
326
		'WS' => esc_html__( 'Western Samoa', 'give' ),
327
		'YE' => esc_html__( 'Yemen', 'give' ),
328
		'YU' => esc_html__( 'Yugoslavia', 'give' ),
329
		'ZM' => esc_html__( 'Zambia', 'give' ),
330
		'ZW' => esc_html__( 'Zimbabwe', 'give' )
331
	);
332
333
	return (array) apply_filters( 'give_countries', $countries );
334
}
335
336
/**
337
 * Get States List.
338
 *
339
 * @since 1.8.11
340
 *
341
 * @return array $states A list of the available states as in array key format.
342
 */
343
function give_states_list() {
344
	$states = array(
345
		'US' => give_get_states_list(),
346
		'CA' => give_get_provinces_list(),
347
		'AU' => give_get_australian_states_list(),
348
		'BR' => give_get_brazil_states_list(),
349
		'CN' => give_get_chinese_states_list(),
350
		'HK' => give_get_hong_kong_states_list(),
351
		'HU' => give_get_hungary_states_list(),
352
		'ID' => give_get_indonesian_states_list(),
353
		'IN' => give_get_indian_states_list(),
354
		'MY' => give_get_malaysian_states_list(),
355
		'NZ' => give_get_new_zealand_states_list(),
356
		'TH' => give_get_thailand_states_list(),
357
		'ZA' => give_get_south_african_states_list(),
358
		'ES' => give_get_spain_states_list(),
359
		'TR' => give_get_turkey_states_list(),
360
		'RO' => give_get_romania_states_list(),
361
		'PK' => give_get_pakistan_states_list(),
362
		'PH' => give_get_philippines_states_list(),
363
		'PE' => give_get_peru_states_list(),
364
		'NP' => give_get_nepal_states_list(),
365
		'NG' => give_get_nigerian_states_list(),
366
		'MX' => give_get_mexico_states_list(),
367
		'JP' => give_get_japan_states_list(),
368
		'IT' => give_get_italy_states_list(),
369
		'IR' => give_get_iran_states_list(),
370
		'IE' => give_get_ireland_states_list(),
371
		'GR' => give_get_greek_states_list(),
372
		'BO' => give_get_bolivian_states_list(),
373
		'BG' => give_get_bulgarian_states_list(),
374
		'BD' => give_get_bangladeshi_states_list(),
375
		'AR' => give_get_argentina_states_list(),
376
	);
377
378
	/**
379
	 * Filter can be used to add or remove the States from the Country.
380
	 *
381
	 * Filters can be use to add states inside the country all the states will be in array format ans the array key will be country code.
382
	 *
383
	 * @since 1.8.11
384
	 *
385
	 * @param array $states Contain the list of states in array key format where key of the array is there respected country code.
386
	 */
387
	return (array) apply_filters( 'give_states_list', $states );
388
}
389
390
/**
391
 * List of Country that have no states init.
392
 *
393
 * There are some country which does not have states init Example: germany.
394
 *
395
 * @since 1.8.11
396
 *
397
 * $$country array $country_code.
398
 */
399 View Code Duplication
function give_no_states_country_list() {
0 ignored issues
show
Duplication introduced by
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
400
	$country_list = array();
401
	$locale       = give_get_country_locale();
402
	foreach ( $locale as $key => $value ) {
403
		if ( ! empty( $value['state'] ) && isset( $value['state']['hidden'] ) && true === $value['state']['hidden'] ) {
404
			$country_list[ $key ] = $value['state'];
405
		}
406
	}
407
408
	/**
409
	 * Filter can be used to add or remove the Country that does not have states init.
410
	 *
411
	 * @since 1.8.11
412
	 *
413
	 * @param array $country Contain key as there country code & value as there country name.
414
	 */
415
	return (array) apply_filters( 'give_no_states_country_list', $country_list );
416
}
417
418
/**
419
 * List of Country in which states feilds is not required.
420
 *
421
 * There are some country in which states feilds is not required Example: United Kingdom ( uk ).
422
 *
423
 * @since 1.8.11
424
 *
425
 * $country array $country_code.
426
 */
427 View Code Duplication
function give_states_not_required_country_list() {
0 ignored issues
show
Duplication introduced by
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
428
	$country_list = array();
429
	$locale       = give_get_country_locale();
430
	foreach ( $locale as $key => $value ) {
431
		if ( ! empty( $value['state'] ) && isset( $value['state']['required'] ) && false === $value['state']['required'] ) {
432
			$country_list[ $key ] = $value['state'];
433
		}
434
	}
435
436
	/**
437
	 * Filter can be used to add or remove the Country in which states feilds is not required.
438
	 *
439
	 * @since 1.8.11
440
	 *
441
	 * @param array $country Contain key as there country code & value as there country name.
442
	 */
443
	return (array) apply_filters( 'give_states_not_required_country_list', $country_list );
444
}
445
446
/**
447
 * Get the label that need to show as an placeholder.
448
 *
449
 * @ since 1.8.12
450
 *
451
 * @return array $country_states_label
452
 */
453
function give_get_states_label() {
454
	$country_states_label = array();
455
	$default_label        = __( 'State', 'give' );
456
	$locale               = give_get_country_locale();
457
	foreach ( $locale as $key => $value ) {
458
		$label = $default_label;
459
		if ( ! empty( $value['state'] ) && ! empty( $value['state']['label'] ) ) {
460
			$label = $value['state']['label'];
461
		}
462
		$country_states_label[ $key ] = $label;
463
	}
464
465
	/**
466
	 * Filter can be used to add or remove the Country that does not have states init.
467
	 *
468
	 * @since 1.8.11
469
	 *
470
	 * @param array $country Contain key as there country code & value as there country name.
471
	 */
472
	return (array) apply_filters( 'give_get_states_label', $country_states_label );
473
}
474
475
/**
476
 * Get country locale settings.
477
 *
478
 * @since 1.8.12
479
 *
480
 * @return array
481
 */
482
function give_get_country_locale() {
483
	return (array) apply_filters( 'give_get_country_locale', array(
484
		'AE' => array(
485
			'state' => array(
486
				'required' => false,
487
			),
488
		),
489
		'AF' => array(
490
			'state' => array(
491
				'required' => false,
492
				'hidden'   => true,
493
			),
494
		),
495
		'AT' => array(
496
			'state' => array(
497
				'required' => false,
498
				'hidden'   => true,
499
			),
500
		),
501
		'AU' => array(
502
			'state' => array(
503
				'label' => __( 'State', 'give' ),
504
			),
505
		),
506
		'AX' => array(
507
			'state' => array(
508
				'required' => false,
509
			),
510
		),
511
		'BD' => array(
512
			'state' => array(
513
				'label' => __( 'District', 'give' ),
514
			),
515
		),
516
		'BE' => array(
517
			'state' => array(
518
				'required' => false,
519
				'label'    => __( 'Province', 'give' ),
520
				'hidden'   => true,
521
			),
522
		),
523
		'BI' => array(
524
			'state' => array(
525
				'required' => false,
526
			),
527
		),
528
		'CA' => array(
529
			'state' => array(
530
				'label' => __( 'Province', 'give' ),
531
			),
532
		),
533
		'CH' => array(
534
			'state' => array(
535
				'label'    => __( 'Canton', 'give' ),
536
				'required' => false,
537
				'hidden'   => true,
538
			),
539
		),
540
		'CL' => array(
541
			'state' => array(
542
				'label' => __( 'Region', 'give' ),
543
			),
544
		),
545
		'CN' => array(
546
			'state' => array(
547
				'label' => __( 'Province', 'give' ),
548
			),
549
		),
550
		'CZ' => array(
551
			'state' => array(
552
				'required' => false,
553
				'hidden'   => true,
554
			),
555
		),
556
		'DE' => array(
557
			'state' => array(
558
				'required' => false,
559
				'hidden'   => true,
560
			),
561
		),
562
		'DK' => array(
563
			'state' => array(
564
				'required' => false,
565
				'hidden'   => true,
566
			),
567
		),
568
		'EE' => array(
569
			'state' => array(
570
				'required' => false,
571
				'hidden'   => true,
572
			),
573
		),
574
		'FI' => array(
575
			'state' => array(
576
				'required' => false,
577
				'hidden'   => true,
578
			),
579
		),
580
		'FR' => array(
581
			'state' => array(
582
				'required' => false,
583
				'hidden'   => true,
584
			),
585
		),
586
		'GP' => array(
587
			'state' => array(
588
				'required' => false,
589
			),
590
		),
591
		'GF' => array(
592
			'state' => array(
593
				'required' => false,
594
			),
595
		),
596
		'HK' => array(
597
			'state' => array(
598
				'label' => __( 'Region', 'give' ),
599
			),
600
		),
601
		'HU' => array(
602
			'state' => array(
603
				'label'  => __( 'County', 'give' ),
604
				'hidden' => true,
605
			),
606
		),
607
		'ID' => array(
608
			'state' => array(
609
				'label' => __( 'Province', 'give' ),
610
			),
611
		),
612
		'IE' => array(
613
			'state' => array(
614
				'label' => __( 'County', 'give' ),
615
			),
616
		),
617
		'IS' => array(
618
			'state' => array(
619
				'required' => false,
620
				'hidden'   => true,
621
			),
622
		),
623
		'IL' => array(
624
			'state' => array(
625
				'required' => false,
626
			),
627
		),
628
		'IT' => array(
629
			'state' => array(
630
				'required' => true,
631
				'label'    => __( 'Province', 'give' ),
632
			),
633
		),
634
		'JP' => array(
635
			'state' => array(
636
				'label' => __( 'Prefecture', 'give' ),
637
			),
638
		),
639
		'KR' => array(
640
			'state' => array(
641
				'required' => false,
642
			),
643
		),
644
		'KW' => array(
645
			'state' => array(
646
				'required' => false,
647
			),
648
		),
649
		'LB' => array(
650
			'state' => array(
651
				'required' => false,
652
			),
653
		),
654
		'MQ' => array(
655
			'state' => array(
656
				'required' => false,
657
			),
658
		),
659
		'NL' => array(
660
			'state' => array(
661
				'required' => false,
662
				'label'    => __( 'Province', 'give' ),
663
				'hidden'   => true,
664
			),
665
		),
666
		'NZ' => array(
667
			'state' => array(
668
				'required' => false,
669
				'label'    => __( 'Region', 'give' ),
670
				'hidden'   => true,
671
			),
672
		),
673
		'NO' => array(
674
			'state' => array(
675
				'required' => false,
676
				'hidden'   => true,
677
			),
678
		),
679
		'NP' => array(
680
			'state' => array(
681
				'label' => __( 'State / Zone', 'give' ),
682
			),
683
		),
684
		'PL' => array(
685
			'state' => array(
686
				'required' => false,
687
				'hidden'   => true,
688
			),
689
		),
690
		'PT' => array(
691
			'state' => array(
692
				'required' => false,
693
				'hidden'   => true,
694
			),
695
		),
696
		'RE' => array(
697
			'state' => array(
698
				'required' => false,
699
			),
700
		),
701
		'RO' => array(
702
			'state' => array(
703
				'required' => false,
704
			),
705
		),
706
		'SG' => array(
707
			'state' => array(
708
				'required' => false,
709
			),
710
		),
711
		'SK' => array(
712
			'state' => array(
713
				'required' => false,
714
				'hidden'   => true,
715
			),
716
		),
717
		'SI' => array(
718
			'state' => array(
719
				'required' => false,
720
				'hidden'   => true,
721
			),
722
		),
723
		'ES' => array(
724
			'state' => array(
725
				'label' => __( 'Province', 'give' ),
726
			),
727
		),
728
		'LI' => array(
729
			'state' => array(
730
				'label'    => __( 'Municipality', 'give' ),
731
				'required' => false,
732
				'hidden'   => true,
733
			),
734
		),
735
		'LK' => array(
736
			'state' => array(
737
				'required' => false,
738
			),
739
		),
740
		'SE' => array(
741
			'state' => array(
742
				'required' => false,
743
				'hidden'   => true,
744
			),
745
		),
746
		'TR' => array(
747
			'state' => array(
748
				'label' => __( 'Province', 'give' ),
749
			),
750
		),
751
		'US' => array(
752
			'state' => array(
753
				'label' => __( 'State', 'give' ),
754
			),
755
		),
756
		'GB' => array(
757
			'state' => array(
758
				'label'    => __( 'County', 'give' ),
759
				'required' => false,
760
			),
761
		),
762
		'VN' => array(
763
			'state' => array(
764
				'required' => false,
765
				'hidden'   => true,
766
			),
767
		),
768
		'YT' => array(
769
			'state' => array(
770
				'required' => false,
771
			),
772
		),
773
		'ZA' => array(
774
			'state' => array(
775
				'label' => __( 'Province', 'give' ),
776
			),
777
		),
778
	) );
779
}
780
781
/**
782
 * Get Turkey States
783
 *
784
 * @since 1.8.12
785
 * @return array $states A list of states
786
 */
787
function give_get_turkey_states_list() {
788
	$states = array(
789
		''     => '',
790
		'TR01' => __( 'Adana', 'give' ),
791
		'TR02' => __( 'Ad&#305;yaman', 'give' ),
792
		'TR03' => __( 'Afyon', 'give' ),
793
		'TR04' => __( 'A&#287;r&#305;', 'give' ),
794
		'TR05' => __( 'Amasya', 'give' ),
795
		'TR06' => __( 'Ankara', 'give' ),
796
		'TR07' => __( 'Antalya', 'give' ),
797
		'TR08' => __( 'Artvin', 'give' ),
798
		'TR09' => __( 'Ayd&#305;n', 'give' ),
799
		'TR10' => __( 'Bal&#305;kesir', 'give' ),
800
		'TR11' => __( 'Bilecik', 'give' ),
801
		'TR12' => __( 'Bing&#246;l', 'give' ),
802
		'TR13' => __( 'Bitlis', 'give' ),
803
		'TR14' => __( 'Bolu', 'give' ),
804
		'TR15' => __( 'Burdur', 'give' ),
805
		'TR16' => __( 'Bursa', 'give' ),
806
		'TR17' => __( '&#199;anakkale', 'give' ),
807
		'TR18' => __( '&#199;ank&#305;r&#305;', 'give' ),
808
		'TR19' => __( '&#199;orum', 'give' ),
809
		'TR20' => __( 'Denizli', 'give' ),
810
		'TR21' => __( 'Diyarbak&#305;r', 'give' ),
811
		'TR22' => __( 'Edirne', 'give' ),
812
		'TR23' => __( 'Elaz&#305;&#287;', 'give' ),
813
		'TR24' => __( 'Erzincan', 'give' ),
814
		'TR25' => __( 'Erzurum', 'give' ),
815
		'TR26' => __( 'Eski&#351;ehir', 'give' ),
816
		'TR27' => __( 'Gaziantep', 'give' ),
817
		'TR28' => __( 'Giresun', 'give' ),
818
		'TR29' => __( 'G&#252;m&#252;&#351;hane', 'give' ),
819
		'TR30' => __( 'Hakkari', 'give' ),
820
		'TR31' => __( 'Hatay', 'give' ),
821
		'TR32' => __( 'Isparta', 'give' ),
822
		'TR33' => __( '&#304;&#231;el', 'give' ),
823
		'TR34' => __( '&#304;stanbul', 'give' ),
824
		'TR35' => __( '&#304;zmir', 'give' ),
825
		'TR36' => __( 'Kars', 'give' ),
826
		'TR37' => __( 'Kastamonu', 'give' ),
827
		'TR38' => __( 'Kayseri', 'give' ),
828
		'TR39' => __( 'K&#305;rklareli', 'give' ),
829
		'TR40' => __( 'K&#305;r&#351;ehir', 'give' ),
830
		'TR41' => __( 'Kocaeli', 'give' ),
831
		'TR42' => __( 'Konya', 'give' ),
832
		'TR43' => __( 'K&#252;tahya', 'give' ),
833
		'TR44' => __( 'Malatya', 'give' ),
834
		'TR45' => __( 'Manisa', 'give' ),
835
		'TR46' => __( 'Kahramanmara&#351;', 'give' ),
836
		'TR47' => __( 'Mardin', 'give' ),
837
		'TR48' => __( 'Mu&#287;la', 'give' ),
838
		'TR49' => __( 'Mu&#351;', 'give' ),
839
		'TR50' => __( 'Nev&#351;ehir', 'give' ),
840
		'TR51' => __( 'Ni&#287;de', 'give' ),
841
		'TR52' => __( 'Ordu', 'give' ),
842
		'TR53' => __( 'Rize', 'give' ),
843
		'TR54' => __( 'Sakarya', 'give' ),
844
		'TR55' => __( 'Samsun', 'give' ),
845
		'TR56' => __( 'Siirt', 'give' ),
846
		'TR57' => __( 'Sinop', 'give' ),
847
		'TR58' => __( 'Sivas', 'give' ),
848
		'TR59' => __( 'Tekirda&#287;', 'give' ),
849
		'TR60' => __( 'Tokat', 'give' ),
850
		'TR61' => __( 'Trabzon', 'give' ),
851
		'TR62' => __( 'Tunceli', 'give' ),
852
		'TR63' => __( '&#350;anl&#305;urfa', 'give' ),
853
		'TR64' => __( 'U&#351;ak', 'give' ),
854
		'TR65' => __( 'Van', 'give' ),
855
		'TR66' => __( 'Yozgat', 'give' ),
856
		'TR67' => __( 'Zonguldak', 'give' ),
857
		'TR68' => __( 'Aksaray', 'give' ),
858
		'TR69' => __( 'Bayburt', 'give' ),
859
		'TR70' => __( 'Karaman', 'give' ),
860
		'TR71' => __( 'K&#305;r&#305;kkale', 'give' ),
861
		'TR72' => __( 'Batman', 'give' ),
862
		'TR73' => __( '&#350;&#305;rnak', 'give' ),
863
		'TR74' => __( 'Bart&#305;n', 'give' ),
864
		'TR75' => __( 'Ardahan', 'give' ),
865
		'TR76' => __( 'I&#287;d&#305;r', 'give' ),
866
		'TR77' => __( 'Yalova', 'give' ),
867
		'TR78' => __( 'Karab&#252;k', 'give' ),
868
		'TR79' => __( 'Kilis', 'give' ),
869
		'TR80' => __( 'Osmaniye', 'give' ),
870
		'TR81' => __( 'D&#252;zce', 'give' ),
871
	);
872
873
	return apply_filters( 'give_turkey_states', $states );
874
}
875
876
/**
877
 * Get Romania States
878
 *
879
 * @since 1.8.12
880
 * @return array $states A list of states
881
 */
882
function give_get_romania_states_list() {
883
	$states = array(
884
		''   => '',
885
		'AB' => __( 'Alba', 'give' ),
886
		'AR' => __( 'Arad', 'give' ),
887
		'AG' => __( 'Arges', 'give' ),
888
		'BC' => __( 'Bacau', 'give' ),
889
		'BH' => __( 'Bihor', 'give' ),
890
		'BN' => __( 'Bistrita-Nasaud', 'give' ),
891
		'BT' => __( 'Botosani', 'give' ),
892
		'BR' => __( 'Braila', 'give' ),
893
		'BV' => __( 'Brasov', 'give' ),
894
		'B'  => __( 'Bucuresti', 'give' ),
895
		'BZ' => __( 'Buzau', 'give' ),
896
		'CL' => __( 'Calarasi', 'give' ),
897
		'CS' => __( 'Caras-Severin', 'give' ),
898
		'CJ' => __( 'Cluj', 'give' ),
899
		'CT' => __( 'Constanta', 'give' ),
900
		'CV' => __( 'Covasna', 'give' ),
901
		'DB' => __( 'Dambovita', 'give' ),
902
		'DJ' => __( 'Dolj', 'give' ),
903
		'GL' => __( 'Galati', 'give' ),
904
		'GR' => __( 'Giurgiu', 'give' ),
905
		'GJ' => __( 'Gorj', 'give' ),
906
		'HR' => __( 'Harghita', 'give' ),
907
		'HD' => __( 'Hunedoara', 'give' ),
908
		'IL' => __( 'Ialomita', 'give' ),
909
		'IS' => __( 'Iasi', 'give' ),
910
		'IF' => __( 'Ilfov', 'give' ),
911
		'MM' => __( 'Maramures', 'give' ),
912
		'MH' => __( 'Mehedinti', 'give' ),
913
		'MS' => __( 'Mures', 'give' ),
914
		'NT' => __( 'Neamt', 'give' ),
915
		'OT' => __( 'Olt', 'give' ),
916
		'PH' => __( 'Prahova', 'give' ),
917
		'SJ' => __( 'Salaj', 'give' ),
918
		'SM' => __( 'Satu Mare', 'give' ),
919
		'SB' => __( 'Sibiu', 'give' ),
920
		'SV' => __( 'Suceava', 'give' ),
921
		'TR' => __( 'Teleorman', 'give' ),
922
		'TM' => __( 'Timis', 'give' ),
923
		'TL' => __( 'Tulcea', 'give' ),
924
		'VL' => __( 'Valcea', 'give' ),
925
		'VS' => __( 'Vaslui', 'give' ),
926
		'VN' => __( 'Vrancea', 'give' ),
927
	);
928
929
	return apply_filters( 'give_romania_states', $states );
930
}
931
932
/**
933
 * Get Pakistan States
934
 *
935
 * @since 1.8.12
936
 * @return array $states A list of states
937
 */
938
function give_get_pakistan_states_list() {
939
	$states = array(
940
		''   => '',
941
		'JK' => __( 'Azad Kashmir', 'give' ),
942
		'BA' => __( 'Balochistan', 'give' ),
943
		'TA' => __( 'FATA', 'give' ),
944
		'GB' => __( 'Gilgit Baltistan', 'give' ),
945
		'IS' => __( 'Islamabad Capital Territory', 'give' ),
946
		'KP' => __( 'Khyber Pakhtunkhwa', 'give' ),
947
		'PB' => __( 'Punjab', 'give' ),
948
		'SD' => __( 'Sindh', 'give' ),
949
	);
950
951
	return apply_filters( 'give_pakistan_states', $states );
952
}
953
954
/**
955
 * Get Philippines States
956
 *
957
 * @since 1.8.12
958
 * @return array $states A list of states
959
 */
960
function give_get_philippines_states_list() {
961
	$states = array(
962
		''    => '',
963
		'ABR' => __( 'Abra', 'give' ),
964
		'AGN' => __( 'Agusan del Norte', 'give' ),
965
		'AGS' => __( 'Agusan del Sur', 'give' ),
966
		'AKL' => __( 'Aklan', 'give' ),
967
		'ALB' => __( 'Albay', 'give' ),
968
		'ANT' => __( 'Antique', 'give' ),
969
		'APA' => __( 'Apayao', 'give' ),
970
		'AUR' => __( 'Aurora', 'give' ),
971
		'BAS' => __( 'Basilan', 'give' ),
972
		'BAN' => __( 'Bataan', 'give' ),
973
		'BTN' => __( 'Batanes', 'give' ),
974
		'BTG' => __( 'Batangas', 'give' ),
975
		'BEN' => __( 'Benguet', 'give' ),
976
		'BIL' => __( 'Biliran', 'give' ),
977
		'BOH' => __( 'Bohol', 'give' ),
978
		'BUK' => __( 'Bukidnon', 'give' ),
979
		'BUL' => __( 'Bulacan', 'give' ),
980
		'CAG' => __( 'Cagayan', 'give' ),
981
		'CAN' => __( 'Camarines Norte', 'give' ),
982
		'CAS' => __( 'Camarines Sur', 'give' ),
983
		'CAM' => __( 'Camiguin', 'give' ),
984
		'CAP' => __( 'Capiz', 'give' ),
985
		'CAT' => __( 'Catanduanes', 'give' ),
986
		'CAV' => __( 'Cavite', 'give' ),
987
		'CEB' => __( 'Cebu', 'give' ),
988
		'COM' => __( 'Compostela Valley', 'give' ),
989
		'NCO' => __( 'Cotabato', 'give' ),
990
		'DAV' => __( 'Davao del Norte', 'give' ),
991
		'DAS' => __( 'Davao del Sur', 'give' ),
992
		'DAC' => __( 'Davao Occidental', 'give' ), // TODO: Needs to be updated when ISO code is assigned
993
		'DAO' => __( 'Davao Oriental', 'give' ),
994
		'DIN' => __( 'Dinagat Islands', 'give' ),
995
		'EAS' => __( 'Eastern Samar', 'give' ),
996
		'GUI' => __( 'Guimaras', 'give' ),
997
		'IFU' => __( 'Ifugao', 'give' ),
998
		'ILN' => __( 'Ilocos Norte', 'give' ),
999
		'ILS' => __( 'Ilocos Sur', 'give' ),
1000
		'ILI' => __( 'Iloilo', 'give' ),
1001
		'ISA' => __( 'Isabela', 'give' ),
1002
		'KAL' => __( 'Kalinga', 'give' ),
1003
		'LUN' => __( 'La Union', 'give' ),
1004
		'LAG' => __( 'Laguna', 'give' ),
1005
		'LAN' => __( 'Lanao del Norte', 'give' ),
1006
		'LAS' => __( 'Lanao del Sur', 'give' ),
1007
		'LEY' => __( 'Leyte', 'give' ),
1008
		'MAG' => __( 'Maguindanao', 'give' ),
1009
		'MAD' => __( 'Marinduque', 'give' ),
1010
		'MAS' => __( 'Masbate', 'give' ),
1011
		'MSC' => __( 'Misamis Occidental', 'give' ),
1012
		'MSR' => __( 'Misamis Oriental', 'give' ),
1013
		'MOU' => __( 'Mountain Province', 'give' ),
1014
		'NEC' => __( 'Negros Occidental', 'give' ),
1015
		'NER' => __( 'Negros Oriental', 'give' ),
1016
		'NSA' => __( 'Northern Samar', 'give' ),
1017
		'NUE' => __( 'Nueva Ecija', 'give' ),
1018
		'NUV' => __( 'Nueva Vizcaya', 'give' ),
1019
		'MDC' => __( 'Occidental Mindoro', 'give' ),
1020
		'MDR' => __( 'Oriental Mindoro', 'give' ),
1021
		'PLW' => __( 'Palawan', 'give' ),
1022
		'PAM' => __( 'Pampanga', 'give' ),
1023
		'PAN' => __( 'Pangasinan', 'give' ),
1024
		'QUE' => __( 'Quezon', 'give' ),
1025
		'QUI' => __( 'Quirino', 'give' ),
1026
		'RIZ' => __( 'Rizal', 'give' ),
1027
		'ROM' => __( 'Romblon', 'give' ),
1028
		'WSA' => __( 'Samar', 'give' ),
1029
		'SAR' => __( 'Sarangani', 'give' ),
1030
		'SIQ' => __( 'Siquijor', 'give' ),
1031
		'SOR' => __( 'Sorsogon', 'give' ),
1032
		'SCO' => __( 'South Cotabato', 'give' ),
1033
		'SLE' => __( 'Southern Leyte', 'give' ),
1034
		'SUK' => __( 'Sultan Kudarat', 'give' ),
1035
		'SLU' => __( 'Sulu', 'give' ),
1036
		'SUN' => __( 'Surigao del Norte', 'give' ),
1037
		'SUR' => __( 'Surigao del Sur', 'give' ),
1038
		'TAR' => __( 'Tarlac', 'give' ),
1039
		'TAW' => __( 'Tawi-Tawi', 'give' ),
1040
		'ZMB' => __( 'Zambales', 'give' ),
1041
		'ZAN' => __( 'Zamboanga del Norte', 'give' ),
1042
		'ZAS' => __( 'Zamboanga del Sur', 'give' ),
1043
		'ZSI' => __( 'Zamboanga Sibugay', 'give' ),
1044
		'00'  => __( 'Metro Manila', 'give' ),
1045
	);
1046
1047
	return apply_filters( 'give_philippines_states', $states );
1048
}
1049
1050
/**
1051
 * Get Peru States
1052
 *
1053
 * @since 1.8.12
1054
 * @return array $states A list of states
1055
 */
1056
function give_get_peru_states_list() {
1057
	$states = array(
1058
		''    => '',
1059
		'CAL' => __( 'El Callao', 'give' ),
1060
		'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ),
1061
		'AMA' => __( 'Amazonas', 'give' ),
1062
		'ANC' => __( 'Ancash', 'give' ),
1063
		'APU' => __( 'Apur&iacute;mac', 'give' ),
1064
		'ARE' => __( 'Arequipa', 'give' ),
1065
		'AYA' => __( 'Ayacucho', 'give' ),
1066
		'CAJ' => __( 'Cajamarca', 'give' ),
1067
		'CUS' => __( 'Cusco', 'give' ),
1068
		'HUV' => __( 'Huancavelica', 'give' ),
1069
		'HUC' => __( 'Hu&aacute;nuco', 'give' ),
1070
		'ICA' => __( 'Ica', 'give' ),
1071
		'JUN' => __( 'Jun&iacute;n', 'give' ),
1072
		'LAL' => __( 'La Libertad', 'give' ),
1073
		'LAM' => __( 'Lambayeque', 'give' ),
1074
		'LIM' => __( 'Lima', 'give' ),
1075
		'LOR' => __( 'Loreto', 'give' ),
1076
		'MDD' => __( 'Madre de Dios', 'give' ),
1077
		'MOQ' => __( 'Moquegua', 'give' ),
1078
		'PAS' => __( 'Pasco', 'give' ),
1079
		'PIU' => __( 'Piura', 'give' ),
1080
		'PUN' => __( 'Puno', 'give' ),
1081
		'SAM' => __( 'San Mart&iacute;n', 'give' ),
1082
		'TAC' => __( 'Tacna', 'give' ),
1083
		'TUM' => __( 'Tumbes', 'give' ),
1084
		'UCA' => __( 'Ucayali', 'give' ),
1085
	);
1086
1087
	return apply_filters( 'give_peru_states', $states );
1088
}
1089
1090
/**
1091
 * Get Nepal States
1092
 *
1093
 * @since 1.8.12
1094
 * @return array $states A list of states
1095
 */
1096
function give_get_nepal_states_list() {
1097
	$states = array(
1098
		''    => '',
1099
		'BAG' => __( 'Bagmati', 'give' ),
1100
		'BHE' => __( 'Bheri', 'give' ),
1101
		'DHA' => __( 'Dhaulagiri', 'give' ),
1102
		'GAN' => __( 'Gandaki', 'give' ),
1103
		'JAN' => __( 'Janakpur', 'give' ),
1104
		'KAR' => __( 'Karnali', 'give' ),
1105
		'KOS' => __( 'Koshi', 'give' ),
1106
		'LUM' => __( 'Lumbini', 'give' ),
1107
		'MAH' => __( 'Mahakali', 'give' ),
1108
		'MEC' => __( 'Mechi', 'give' ),
1109
		'NAR' => __( 'Narayani', 'give' ),
1110
		'RAP' => __( 'Rapti', 'give' ),
1111
		'SAG' => __( 'Sagarmatha', 'give' ),
1112
		'SET' => __( 'Seti', 'give' ),
1113
	);
1114
1115
	return apply_filters( 'give_nepal_states', $states );
1116
}
1117
1118
/**
1119
 * Get Nigerian States
1120
 *
1121
 * @since 1.8.12
1122
 * @return array $states A list of states
1123
 */
1124
function give_get_nigerian_states_list() {
1125
	$states = array(
1126
		''   => '',
1127
		'AB' => __( 'Abia', 'give' ),
1128
		'FC' => __( 'Abuja', 'give' ),
1129
		'AD' => __( 'Adamawa', 'give' ),
1130
		'AK' => __( 'Akwa Ibom', 'give' ),
1131
		'AN' => __( 'Anambra', 'give' ),
1132
		'BA' => __( 'Bauchi', 'give' ),
1133
		'BY' => __( 'Bayelsa', 'give' ),
1134
		'BE' => __( 'Benue', 'give' ),
1135
		'BO' => __( 'Borno', 'give' ),
1136
		'CR' => __( 'Cross River', 'give' ),
1137
		'DE' => __( 'Delta', 'give' ),
1138
		'EB' => __( 'Ebonyi', 'give' ),
1139
		'ED' => __( 'Edo', 'give' ),
1140
		'EK' => __( 'Ekiti', 'give' ),
1141
		'EN' => __( 'Enugu', 'give' ),
1142
		'GO' => __( 'Gombe', 'give' ),
1143
		'IM' => __( 'Imo', 'give' ),
1144
		'JI' => __( 'Jigawa', 'give' ),
1145
		'KD' => __( 'Kaduna', 'give' ),
1146
		'KN' => __( 'Kano', 'give' ),
1147
		'KT' => __( 'Katsina', 'give' ),
1148
		'KE' => __( 'Kebbi', 'give' ),
1149
		'KO' => __( 'Kogi', 'give' ),
1150
		'KW' => __( 'Kwara', 'give' ),
1151
		'LA' => __( 'Lagos', 'give' ),
1152
		'NA' => __( 'Nasarawa', 'give' ),
1153
		'NI' => __( 'Niger', 'give' ),
1154
		'OG' => __( 'Ogun', 'give' ),
1155
		'ON' => __( 'Ondo', 'give' ),
1156
		'OS' => __( 'Osun', 'give' ),
1157
		'OY' => __( 'Oyo', 'give' ),
1158
		'PL' => __( 'Plateau', 'give' ),
1159
		'RI' => __( 'Rivers', 'give' ),
1160
		'SO' => __( 'Sokoto', 'give' ),
1161
		'TA' => __( 'Taraba', 'give' ),
1162
		'YO' => __( 'Yobe', 'give' ),
1163
		'ZA' => __( 'Zamfara', 'give' ),
1164
	);
1165
1166
	return apply_filters( 'give_nigerian_states', $states );
1167
}
1168
1169
/**
1170
 * Get Mexico States
1171
 *
1172
 * @since 1.8.12
1173
 * @return array $states A list of states
1174
 */
1175
function give_get_mexico_states_list() {
1176
	$states = array(
1177
		''                    => '',
1178
		'Distrito Federal'    => __( 'Distrito Federal', 'give' ),
1179
		'Jalisco'             => __( 'Jalisco', 'give' ),
1180
		'Nuevo Leon'          => __( 'Nuevo León', 'give' ),
1181
		'Aguascalientes'      => __( 'Aguascalientes', 'give' ),
1182
		'Baja California'     => __( 'Baja California', 'give' ),
1183
		'Baja California Sur' => __( 'Baja California Sur', 'give' ),
1184
		'Campeche'            => __( 'Campeche', 'give' ),
1185
		'Chiapas'             => __( 'Chiapas', 'give' ),
1186
		'Chihuahua'           => __( 'Chihuahua', 'give' ),
1187
		'Coahuila'            => __( 'Coahuila', 'give' ),
1188
		'Colima'              => __( 'Colima', 'give' ),
1189
		'Durango'             => __( 'Durango', 'give' ),
1190
		'Guanajuato'          => __( 'Guanajuato', 'give' ),
1191
		'Guerrero'            => __( 'Guerrero', 'give' ),
1192
		'Hidalgo'             => __( 'Hidalgo', 'give' ),
1193
		'Estado de Mexico'    => __( 'Edo. de México', 'give' ),
1194
		'Michoacan'           => __( 'Michoacán', 'give' ),
1195
		'Morelos'             => __( 'Morelos', 'give' ),
1196
		'Nayarit'             => __( 'Nayarit', 'give' ),
1197
		'Oaxaca'              => __( 'Oaxaca', 'give' ),
1198
		'Puebla'              => __( 'Puebla', 'give' ),
1199
		'Queretaro'           => __( 'Querétaro', 'give' ),
1200
		'Quintana Roo'        => __( 'Quintana Roo', 'give' ),
1201
		'San Luis Potosi'     => __( 'San Luis Potosí', 'give' ),
1202
		'Sinaloa'             => __( 'Sinaloa', 'give' ),
1203
		'Sonora'              => __( 'Sonora', 'give' ),
1204
		'Tabasco'             => __( 'Tabasco', 'give' ),
1205
		'Tamaulipas'          => __( 'Tamaulipas', 'give' ),
1206
		'Tlaxcala'            => __( 'Tlaxcala', 'give' ),
1207
		'Veracruz'            => __( 'Veracruz', 'give' ),
1208
		'Yucatan'             => __( 'Yucatán', 'give' ),
1209
		'Zacatecas'           => __( 'Zacatecas', 'give' ),
1210
	);
1211
1212
	return apply_filters( 'give_mexico_states', $states );
1213
}
1214
1215
/**
1216
 * Get Japan States
1217
 *
1218
 * @since 1.8.12
1219
 * @return array $states A list of states
1220
 */
1221
function give_get_japan_states_list() {
1222
	$states = array(
1223
		''     => '',
1224
		'JP01' => __( 'Hokkaido', 'give' ),
1225
		'JP02' => __( 'Aomori', 'give' ),
1226
		'JP03' => __( 'Iwate', 'give' ),
1227
		'JP04' => __( 'Miyagi', 'give' ),
1228
		'JP05' => __( 'Akita', 'give' ),
1229
		'JP06' => __( 'Yamagata', 'give' ),
1230
		'JP07' => __( 'Fukushima', 'give' ),
1231
		'JP08' => __( 'Ibaraki', 'give' ),
1232
		'JP09' => __( 'Tochigi', 'give' ),
1233
		'JP10' => __( 'Gunma', 'give' ),
1234
		'JP11' => __( 'Saitama', 'give' ),
1235
		'JP12' => __( 'Chiba', 'give' ),
1236
		'JP13' => __( 'Tokyo', 'give' ),
1237
		'JP14' => __( 'Kanagawa', 'give' ),
1238
		'JP15' => __( 'Niigata', 'give' ),
1239
		'JP16' => __( 'Toyama', 'give' ),
1240
		'JP17' => __( 'Ishikawa', 'give' ),
1241
		'JP18' => __( 'Fukui', 'give' ),
1242
		'JP19' => __( 'Yamanashi', 'give' ),
1243
		'JP20' => __( 'Nagano', 'give' ),
1244
		'JP21' => __( 'Gifu', 'give' ),
1245
		'JP22' => __( 'Shizuoka', 'give' ),
1246
		'JP23' => __( 'Aichi', 'give' ),
1247
		'JP24' => __( 'Mie', 'give' ),
1248
		'JP25' => __( 'Shiga', 'give' ),
1249
		'JP26' => __( 'Kyoto', 'give' ),
1250
		'JP27' => __( 'Osaka', 'give' ),
1251
		'JP28' => __( 'Hyogo', 'give' ),
1252
		'JP29' => __( 'Nara', 'give' ),
1253
		'JP30' => __( 'Wakayama', 'give' ),
1254
		'JP31' => __( 'Tottori', 'give' ),
1255
		'JP32' => __( 'Shimane', 'give' ),
1256
		'JP33' => __( 'Okayama', 'give' ),
1257
		'JP34' => __( 'Hiroshima', 'give' ),
1258
		'JP35' => __( 'Yamaguchi', 'give' ),
1259
		'JP36' => __( 'Tokushima', 'give' ),
1260
		'JP37' => __( 'Kagawa', 'give' ),
1261
		'JP38' => __( 'Ehime', 'give' ),
1262
		'JP39' => __( 'Kochi', 'give' ),
1263
		'JP40' => __( 'Fukuoka', 'give' ),
1264
		'JP41' => __( 'Saga', 'give' ),
1265
		'JP42' => __( 'Nagasaki', 'give' ),
1266
		'JP43' => __( 'Kumamoto', 'give' ),
1267
		'JP44' => __( 'Oita', 'give' ),
1268
		'JP45' => __( 'Miyazaki', 'give' ),
1269
		'JP46' => __( 'Kagoshima', 'give' ),
1270
		'JP47' => __( 'Okinawa', 'give' ),
1271
	);
1272
1273
	return apply_filters( 'give_japan_states', $states );
1274
}
1275
1276
/**
1277
 * Get Italy States
1278
 *
1279
 * @since 1.8.12
1280
 * @return array $states A list of states
1281
 */
1282
function give_get_italy_states_list() {
1283
	$states = array(
1284
		''   => '',
1285
		'AG' => __( 'Agrigento', 'give' ),
1286
		'AL' => __( 'Alessandria', 'give' ),
1287
		'AN' => __( 'Ancona', 'give' ),
1288
		'AO' => __( 'Aosta', 'give' ),
1289
		'AR' => __( 'Arezzo', 'give' ),
1290
		'AP' => __( 'Ascoli Piceno', 'give' ),
1291
		'AT' => __( 'Asti', 'give' ),
1292
		'AV' => __( 'Avellino', 'give' ),
1293
		'BA' => __( 'Bari', 'give' ),
1294
		'BT' => __( 'Barletta-Andria-Trani', 'give' ),
1295
		'BL' => __( 'Belluno', 'give' ),
1296
		'BN' => __( 'Benevento', 'give' ),
1297
		'BG' => __( 'Bergamo', 'give' ),
1298
		'BI' => __( 'Biella', 'give' ),
1299
		'BO' => __( 'Bologna', 'give' ),
1300
		'BZ' => __( 'Bolzano', 'give' ),
1301
		'BS' => __( 'Brescia', 'give' ),
1302
		'BR' => __( 'Brindisi', 'give' ),
1303
		'CA' => __( 'Cagliari', 'give' ),
1304
		'CL' => __( 'Caltanissetta', 'give' ),
1305
		'CB' => __( 'Campobasso', 'give' ),
1306
		'CI' => __( 'Carbonia-Iglesias', 'give' ),
1307
		'CE' => __( 'Caserta', 'give' ),
1308
		'CT' => __( 'Catania', 'give' ),
1309
		'CZ' => __( 'Catanzaro', 'give' ),
1310
		'CH' => __( 'Chieti', 'give' ),
1311
		'CO' => __( 'Como', 'give' ),
1312
		'CS' => __( 'Cosenza', 'give' ),
1313
		'CR' => __( 'Cremona', 'give' ),
1314
		'KR' => __( 'Crotone', 'give' ),
1315
		'CN' => __( 'Cuneo', 'give' ),
1316
		'EN' => __( 'Enna', 'give' ),
1317
		'FM' => __( 'Fermo', 'give' ),
1318
		'FE' => __( 'Ferrara', 'give' ),
1319
		'FI' => __( 'Firenze', 'give' ),
1320
		'FG' => __( 'Foggia', 'give' ),
1321
		'FC' => __( 'Forlì-Cesena', 'give' ),
1322
		'FR' => __( 'Frosinone', 'give' ),
1323
		'GE' => __( 'Genova', 'give' ),
1324
		'GO' => __( 'Gorizia', 'give' ),
1325
		'GR' => __( 'Grosseto', 'give' ),
1326
		'IM' => __( 'Imperia', 'give' ),
1327
		'IS' => __( 'Isernia', 'give' ),
1328
		'SP' => __( 'La Spezia', 'give' ),
1329
		'AQ' => __( "L'Aquila", 'give' ),
1330
		'LT' => __( 'Latina', 'give' ),
1331
		'LE' => __( 'Lecce', 'give' ),
1332
		'LC' => __( 'Lecco', 'give' ),
1333
		'LI' => __( 'Livorno', 'give' ),
1334
		'LO' => __( 'Lodi', 'give' ),
1335
		'LU' => __( 'Lucca', 'give' ),
1336
		'MC' => __( 'Macerata', 'give' ),
1337
		'MN' => __( 'Mantova', 'give' ),
1338
		'MS' => __( 'Massa-Carrara', 'give' ),
1339
		'MT' => __( 'Matera', 'give' ),
1340
		'ME' => __( 'Messina', 'give' ),
1341
		'MI' => __( 'Milano', 'give' ),
1342
		'MO' => __( 'Modena', 'give' ),
1343
		'MB' => __( 'Monza e della Brianza', 'give' ),
1344
		'NA' => __( 'Napoli', 'give' ),
1345
		'NO' => __( 'Novara', 'give' ),
1346
		'NU' => __( 'Nuoro', 'give' ),
1347
		'OT' => __( 'Olbia-Tempio', 'give' ),
1348
		'OR' => __( 'Oristano', 'give' ),
1349
		'PD' => __( 'Padova', 'give' ),
1350
		'PA' => __( 'Palermo', 'give' ),
1351
		'PR' => __( 'Parma', 'give' ),
1352
		'PV' => __( 'Pavia', 'give' ),
1353
		'PG' => __( 'Perugia', 'give' ),
1354
		'PU' => __( 'Pesaro e Urbino', 'give' ),
1355
		'PE' => __( 'Pescara', 'give' ),
1356
		'PC' => __( 'Piacenza', 'give' ),
1357
		'PI' => __( 'Pisa', 'give' ),
1358
		'PT' => __( 'Pistoia', 'give' ),
1359
		'PN' => __( 'Pordenone', 'give' ),
1360
		'PZ' => __( 'Potenza', 'give' ),
1361
		'PO' => __( 'Prato', 'give' ),
1362
		'RG' => __( 'Ragusa', 'give' ),
1363
		'RA' => __( 'Ravenna', 'give' ),
1364
		'RC' => __( 'Reggio Calabria', 'give' ),
1365
		'RE' => __( 'Reggio Emilia', 'give' ),
1366
		'RI' => __( 'Rieti', 'give' ),
1367
		'RN' => __( 'Rimini', 'give' ),
1368
		'RM' => __( 'Roma', 'give' ),
1369
		'RO' => __( 'Rovigo', 'give' ),
1370
		'SA' => __( 'Salerno', 'give' ),
1371
		'VS' => __( 'Medio Campidano', 'give' ),
1372
		'SS' => __( 'Sassari', 'give' ),
1373
		'SV' => __( 'Savona', 'give' ),
1374
		'SI' => __( 'Siena', 'give' ),
1375
		'SR' => __( 'Siracusa', 'give' ),
1376
		'SO' => __( 'Sondrio', 'give' ),
1377
		'TA' => __( 'Taranto', 'give' ),
1378
		'TE' => __( 'Teramo', 'give' ),
1379
		'TR' => __( 'Terni', 'give' ),
1380
		'TO' => __( 'Torino', 'give' ),
1381
		'OG' => __( 'Ogliastra', 'give' ),
1382
		'TP' => __( 'Trapani', 'give' ),
1383
		'TN' => __( 'Trento', 'give' ),
1384
		'TV' => __( 'Treviso', 'give' ),
1385
		'TS' => __( 'Trieste', 'give' ),
1386
		'UD' => __( 'Udine', 'give' ),
1387
		'VA' => __( 'Varese', 'give' ),
1388
		'VE' => __( 'Venezia', 'give' ),
1389
		'VB' => __( 'Verbano-Cusio-Ossola', 'give' ),
1390
		'VC' => __( 'Vercelli', 'give' ),
1391
		'VR' => __( 'Verona', 'give' ),
1392
		'VV' => __( 'Vibo Valentia', 'give' ),
1393
		'VI' => __( 'Vicenza', 'give' ),
1394
		'VT' => __( 'Viterbo', 'give' ),
1395
	);
1396
1397
	return apply_filters( 'give_italy_states', $states );
1398
}
1399
1400
/**
1401
 * Get Iran States
1402
 *
1403
 * @since 1.8.12
1404
 * @return array $states A list of states
1405
 */
1406
function give_get_iran_states_list() {
1407
	$states = array(
1408
		''    => '',
1409
		'KHZ' => __( 'Khuzestan  (خوزستان)', 'give' ),
1410
		'THR' => __( 'Tehran  (تهران)', 'give' ),
1411
		'ILM' => __( 'Ilaam (ایلام)', 'give' ),
1412
		'BHR' => __( 'Bushehr (بوشهر)', 'give' ),
1413
		'ADL' => __( 'Ardabil (اردبیل)', 'give' ),
1414
		'ESF' => __( 'Isfahan (اصفهان)', 'give' ),
1415
		'YZD' => __( 'Yazd (یزد)', 'give' ),
1416
		'KRH' => __( 'Kermanshah (کرمانشاه)', 'give' ),
1417
		'KRN' => __( 'Kerman (کرمان)', 'give' ),
1418
		'HDN' => __( 'Hamadan (همدان)', 'give' ),
1419
		'GZN' => __( 'Ghazvin (قزوین)', 'give' ),
1420
		'ZJN' => __( 'Zanjan (زنجان)', 'give' ),
1421
		'LRS' => __( 'Luristan (لرستان)', 'give' ),
1422
		'ABZ' => __( 'Alborz (البرز)', 'give' ),
1423
		'EAZ' => __( 'East Azarbaijan (آذربایجان شرقی)', 'give' ),
1424
		'WAZ' => __( 'West Azarbaijan (آذربایجان غربی)', 'give' ),
1425
		'CHB' => __( 'Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give' ),
1426
		'SKH' => __( 'South Khorasan (خراسان جنوبی)', 'give' ),
1427
		'RKH' => __( 'Razavi Khorasan (خراسان رضوی)', 'give' ),
1428
		'NKH' => __( 'North Khorasan (خراسان جنوبی)', 'give' ),
1429
		'SMN' => __( 'Semnan (سمنان)', 'give' ),
1430
		'FRS' => __( 'Fars (فارس)', 'give' ),
1431
		'QHM' => __( 'Qom (قم)', 'give' ),
1432
		'KRD' => __( 'Kurdistan / کردستان)', 'give' ),
1433
		'KBD' => __( 'Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give' ),
1434
		'GLS' => __( 'Golestan (گلستان)', 'give' ),
1435
		'GIL' => __( 'Gilan (گیلان)', 'give' ),
1436
		'MZN' => __( 'Mazandaran (مازندران)', 'give' ),
1437
		'MKZ' => __( 'Markazi (مرکزی)', 'give' ),
1438
		'HRZ' => __( 'Hormozgan (هرمزگان)', 'give' ),
1439
		'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ),
1440
	);
1441
1442
	return apply_filters( 'give_iran_states', $states );
1443
}
1444
1445
/**
1446
 * Get Ireland States
1447
 *
1448
 * @since 1.8.12
1449
 * @return array $states A list of states
1450
 */
1451
function give_get_ireland_states_list() {
1452
	$states = array(
1453
		''   => '',
1454
		'CE' => __( 'Clare', 'give' ),
1455
		'CK' => __( 'Cork', 'give' ),
1456
		'CN' => __( 'Cavan', 'give' ),
1457
		'CW' => __( 'Carlow', 'give' ),
1458
		'DL' => __( 'Donegal', 'give' ),
1459
		'DN' => __( 'Dublin', 'give' ),
1460
		'GY' => __( 'Galway', 'give' ),
1461
		'KE' => __( 'Kildare', 'give' ),
1462
		'KK' => __( 'Kilkenny', 'give' ),
1463
		'KY' => __( 'Kerry', 'give' ),
1464
		'LD' => __( 'Longford', 'give' ),
1465
		'LH' => __( 'Louth', 'give' ),
1466
		'LK' => __( 'Limerick', 'give' ),
1467
		'LM' => __( 'Leitrim', 'give' ),
1468
		'LS' => __( 'Laois', 'give' ),
1469
		'MH' => __( 'Meath', 'give' ),
1470
		'MN' => __( 'Monaghan', 'give' ),
1471
		'MO' => __( 'Mayo', 'give' ),
1472
		'OY' => __( 'Offaly', 'give' ),
1473
		'RN' => __( 'Roscommon', 'give' ),
1474
		'SO' => __( 'Sligo', 'give' ),
1475
		'TY' => __( 'Tipperary', 'give' ),
1476
		'WD' => __( 'Waterford', 'give' ),
1477
		'WH' => __( 'Westmeath', 'give' ),
1478
		'WW' => __( 'Wicklow', 'give' ),
1479
		'WX' => __( 'Wexford', 'give' ),
1480
	);
1481
1482
	return apply_filters( 'give_ireland_states', $states );
1483
}
1484
1485
/**
1486
 * Get Greek States
1487
 *
1488
 * @since 1.8.12
1489
 * @return array $states A list of states
1490
 */
1491
function give_get_greek_states_list() {
1492
	$states = array(
1493
		''  => '',
1494
		'I' => __( 'Αττική', 'give' ),
1495
		'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ),
1496
		'B' => __( 'Κεντρική Μακεδονία', 'give' ),
1497
		'C' => __( 'Δυτική Μακεδονία', 'give' ),
1498
		'D' => __( 'Ήπειρος', 'give' ),
1499
		'E' => __( 'Θεσσαλία', 'give' ),
1500
		'F' => __( 'Ιόνιοι Νήσοι', 'give' ),
1501
		'G' => __( 'Δυτική Ελλάδα', 'give' ),
1502
		'H' => __( 'Στερεά Ελλάδα', 'give' ),
1503
		'J' => __( 'Πελοπόννησος', 'give' ),
1504
		'K' => __( 'Βόρειο Αιγαίο', 'give' ),
1505
		'L' => __( 'Νότιο Αιγαίο', 'give' ),
1506
		'M' => __( 'Κρήτη', 'give' ),
1507
	);
1508
1509
	return apply_filters( 'give_greek_states', $states );
1510
}
1511
1512
/**
1513
 * Get bolivian States
1514
 *
1515
 * @since 1.8.12
1516
 * @return array $states A list of states
1517
 */
1518
function give_get_bolivian_states_list() {
1519
	$states = array(
1520
		''  => '',
1521
		'B' => __( 'Chuquisaca', 'give' ),
1522
		'H' => __( 'Beni', 'give' ),
1523
		'C' => __( 'Cochabamba', 'give' ),
1524
		'L' => __( 'La Paz', 'give' ),
1525
		'O' => __( 'Oruro', 'give' ),
1526
		'N' => __( 'Pando', 'give' ),
1527
		'P' => __( 'Potosí', 'give' ),
1528
		'S' => __( 'Santa Cruz', 'give' ),
1529
		'T' => __( 'Tarija', 'give' ),
1530
	);
1531
1532
	return apply_filters( 'give_bolivian_states', $states );
1533
}
1534
1535
/**
1536
 * Get Bulgarian States
1537
 *
1538
 * @since 1.8.12
1539
 * @return array $states A list of states
1540
 */
1541
function give_get_bulgarian_states_list() {
1542
	$states = array(
1543
		''      => '',
1544
		'BG-01' => __( 'Blagoevgrad', 'give' ),
1545
		'BG-02' => __( 'Burgas', 'give' ),
1546
		'BG-08' => __( 'Dobrich', 'give' ),
1547
		'BG-07' => __( 'Gabrovo', 'give' ),
1548
		'BG-26' => __( 'Haskovo', 'give' ),
1549
		'BG-09' => __( 'Kardzhali', 'give' ),
1550
		'BG-10' => __( 'Kyustendil', 'give' ),
1551
		'BG-11' => __( 'Lovech', 'give' ),
1552
		'BG-12' => __( 'Montana', 'give' ),
1553
		'BG-13' => __( 'Pazardzhik', 'give' ),
1554
		'BG-14' => __( 'Pernik', 'give' ),
1555
		'BG-15' => __( 'Pleven', 'give' ),
1556
		'BG-16' => __( 'Plovdiv', 'give' ),
1557
		'BG-17' => __( 'Razgrad', 'give' ),
1558
		'BG-18' => __( 'Ruse', 'give' ),
1559
		'BG-27' => __( 'Shumen', 'give' ),
1560
		'BG-19' => __( 'Silistra', 'give' ),
1561
		'BG-20' => __( 'Sliven', 'give' ),
1562
		'BG-21' => __( 'Smolyan', 'give' ),
1563
		'BG-23' => __( 'Sofia', 'give' ),
1564
		'BG-22' => __( 'Sofia-Grad', 'give' ),
1565
		'BG-24' => __( 'Stara Zagora', 'give' ),
1566
		'BG-25' => __( 'Targovishte', 'give' ),
1567
		'BG-03' => __( 'Varna', 'give' ),
1568
		'BG-04' => __( 'Veliko Tarnovo', 'give' ),
1569
		'BG-05' => __( 'Vidin', 'give' ),
1570
		'BG-06' => __( 'Vratsa', 'give' ),
1571
		'BG-28' => __( 'Yambol', 'give' ),
1572
	);
1573
1574
	return apply_filters( 'give_bulgarian_states', $states );
1575
}
1576
1577
/**
1578
 * Get Bangladeshi States
1579
 *
1580
 * @since 1.8.12.
1581
 * @return array $states A list of states
1582
 */
1583
function give_get_bangladeshi_states_list() {
1584
	$states = array(
1585
		''     => '',
1586
		'BAG'  => __( 'Bagerhat', 'give' ),
1587
		'BAN'  => __( 'Bandarban', 'give' ),
1588
		'BAR'  => __( 'Barguna', 'give' ),
1589
		'BARI' => __( 'Barisal', 'give' ),
1590
		'BHO'  => __( 'Bhola', 'give' ),
1591
		'BOG'  => __( 'Bogra', 'give' ),
1592
		'BRA'  => __( 'Brahmanbaria', 'give' ),
1593
		'CHA'  => __( 'Chandpur', 'give' ),
1594
		'CHI'  => __( 'Chittagong', 'give' ),
1595
		'CHU'  => __( 'Chuadanga', 'give' ),
1596
		'COM'  => __( 'Comilla', 'give' ),
1597
		'COX'  => __( "Cox's Bazar", 'give' ),
1598
		'DHA'  => __( 'Dhaka', 'give' ),
1599
		'DIN'  => __( 'Dinajpur', 'give' ),
1600
		'FAR'  => __( 'Faridpur ', 'give' ),
1601
		'FEN'  => __( 'Feni', 'give' ),
1602
		'GAI'  => __( 'Gaibandha', 'give' ),
1603
		'GAZI' => __( 'Gazipur', 'give' ),
1604
		'GOP'  => __( 'Gopalganj', 'give' ),
1605
		'HAB'  => __( 'Habiganj', 'give' ),
1606
		'JAM'  => __( 'Jamalpur', 'give' ),
1607
		'JES'  => __( 'Jessore', 'give' ),
1608
		'JHA'  => __( 'Jhalokati', 'give' ),
1609
		'JHE'  => __( 'Jhenaidah', 'give' ),
1610
		'JOY'  => __( 'Joypurhat', 'give' ),
1611
		'KHA'  => __( 'Khagrachhari', 'give' ),
1612
		'KHU'  => __( 'Khulna', 'give' ),
1613
		'KIS'  => __( 'Kishoreganj', 'give' ),
1614
		'KUR'  => __( 'Kurigram', 'give' ),
1615
		'KUS'  => __( 'Kushtia', 'give' ),
1616
		'LAK'  => __( 'Lakshmipur', 'give' ),
1617
		'LAL'  => __( 'Lalmonirhat', 'give' ),
1618
		'MAD'  => __( 'Madaripur', 'give' ),
1619
		'MAG'  => __( 'Magura', 'give' ),
1620
		'MAN'  => __( 'Manikganj ', 'give' ),
1621
		'MEH'  => __( 'Meherpur', 'give' ),
1622
		'MOU'  => __( 'Moulvibazar', 'give' ),
1623
		'MUN'  => __( 'Munshiganj', 'give' ),
1624
		'MYM'  => __( 'Mymensingh', 'give' ),
1625
		'NAO'  => __( 'Naogaon', 'give' ),
1626
		'NAR'  => __( 'Narail', 'give' ),
1627
		'NARG' => __( 'Narayanganj', 'give' ),
1628
		'NARD' => __( 'Narsingdi', 'give' ),
1629
		'NAT'  => __( 'Natore', 'give' ),
1630
		'NAW'  => __( 'Nawabganj', 'give' ),
1631
		'NET'  => __( 'Netrakona', 'give' ),
1632
		'NIL'  => __( 'Nilphamari', 'give' ),
1633
		'NOA'  => __( 'Noakhali', 'give' ),
1634
		'PAB'  => __( 'Pabna', 'give' ),
1635
		'PAN'  => __( 'Panchagarh', 'give' ),
1636
		'PAT'  => __( 'Patuakhali', 'give' ),
1637
		'PIR'  => __( 'Pirojpur', 'give' ),
1638
		'RAJB' => __( 'Rajbari', 'give' ),
1639
		'RAJ'  => __( 'Rajshahi', 'give' ),
1640
		'RAN'  => __( 'Rangamati', 'give' ),
1641
		'RANP' => __( 'Rangpur', 'give' ),
1642
		'SAT'  => __( 'Satkhira', 'give' ),
1643
		'SHA'  => __( 'Shariatpur', 'give' ),
1644
		'SHE'  => __( 'Sherpur', 'give' ),
1645
		'SIR'  => __( 'Sirajganj', 'give' ),
1646
		'SUN'  => __( 'Sunamganj', 'give' ),
1647
		'SYL'  => __( 'Sylhet', 'give' ),
1648
		'TAN'  => __( 'Tangail', 'give' ),
1649
		'THA'  => __( 'Thakurgaon', 'give' ),
1650
	);
1651
1652
	return apply_filters( 'give_bangladeshi_states', $states );
1653
}
1654
1655
/**
1656
 * Get Argentina States
1657
 *
1658
 * @since 1.8.12
1659
 * @return array $states A list of states
1660
 */
1661
function give_get_argentina_states_list() {
1662
	$states = array(
1663
		''  => '',
1664
		'C' => __( 'Ciudad Aut&oacute;noma de Buenos Aires', 'give' ),
1665
		'B' => __( 'Buenos Aires', 'give' ),
1666
		'K' => __( 'Catamarca', 'give' ),
1667
		'H' => __( 'Chaco', 'give' ),
1668
		'U' => __( 'Chubut', 'give' ),
1669
		'X' => __( 'C&oacute;rdoba', 'give' ),
1670
		'W' => __( 'Corrientes', 'give' ),
1671
		'E' => __( 'Entre R&iacute;os', 'give' ),
1672
		'P' => __( 'Formosa', 'give' ),
1673
		'Y' => __( 'Jujuy', 'give' ),
1674
		'L' => __( 'La Pampa', 'give' ),
1675
		'F' => __( 'La Rioja', 'give' ),
1676
		'M' => __( 'Mendoza', 'give' ),
1677
		'N' => __( 'Misiones', 'give' ),
1678
		'Q' => __( 'Neuqu&eacute;n', 'give' ),
1679
		'R' => __( 'R&iacute;o Negro', 'give' ),
1680
		'A' => __( 'Salta', 'give' ),
1681
		'J' => __( 'San Juan', 'give' ),
1682
		'D' => __( 'San Luis', 'give' ),
1683
		'Z' => __( 'Santa Cruz', 'give' ),
1684
		'S' => __( 'Santa Fe', 'give' ),
1685
		'G' => __( 'Santiago del Estero', 'give' ),
1686
		'V' => __( 'Tierra del Fuego', 'give' ),
1687
		'T' => __( 'Tucum&aacute;n', 'give' ),
1688
	);
1689
1690
	return apply_filters( 'give_argentina_states', $states );
1691
}
1692
1693
/**
1694
 * Get States List
1695
 *
1696
 * @access      public
1697
 * @since       1.2
1698
 * @return      array
1699
 */
1700
function give_get_states_list() {
1701
	$states = array(
1702
		''   => '',
1703
		'AL' => 'Alabama',
1704
		'AK' => 'Alaska',
1705
		'AZ' => 'Arizona',
1706
		'AR' => 'Arkansas',
1707
		'CA' => 'California',
1708
		'CO' => 'Colorado',
1709
		'CT' => 'Connecticut',
1710
		'DE' => 'Delaware',
1711
		'DC' => 'District of Columbia',
1712
		'FL' => 'Florida',
1713
		'GA' => 'Georgia',
1714
		'HI' => 'Hawaii',
1715
		'ID' => 'Idaho',
1716
		'IL' => 'Illinois',
1717
		'IN' => 'Indiana',
1718
		'IA' => 'Iowa',
1719
		'KS' => 'Kansas',
1720
		'KY' => 'Kentucky',
1721
		'LA' => 'Louisiana',
1722
		'ME' => 'Maine',
1723
		'MD' => 'Maryland',
1724
		'MA' => 'Massachusetts',
1725
		'MI' => 'Michigan',
1726
		'MN' => 'Minnesota',
1727
		'MS' => 'Mississippi',
1728
		'MO' => 'Missouri',
1729
		'MT' => 'Montana',
1730
		'NE' => 'Nebraska',
1731
		'NV' => 'Nevada',
1732
		'NH' => 'New Hampshire',
1733
		'NJ' => 'New Jersey',
1734
		'NM' => 'New Mexico',
1735
		'NY' => 'New York',
1736
		'NC' => 'North Carolina',
1737
		'ND' => 'North Dakota',
1738
		'OH' => 'Ohio',
1739
		'OK' => 'Oklahoma',
1740
		'OR' => 'Oregon',
1741
		'PA' => 'Pennsylvania',
1742
		'RI' => 'Rhode Island',
1743
		'SC' => 'South Carolina',
1744
		'SD' => 'South Dakota',
1745
		'TN' => 'Tennessee',
1746
		'TX' => 'Texas',
1747
		'UT' => 'Utah',
1748
		'VT' => 'Vermont',
1749
		'VA' => 'Virginia',
1750
		'WA' => 'Washington',
1751
		'WV' => 'West Virginia',
1752
		'WI' => 'Wisconsin',
1753
		'WY' => 'Wyoming',
1754
		'AS' => 'American Samoa',
1755
		'CZ' => 'Canal Zone',
1756
		'CM' => 'Commonwealth of the Northern Mariana Islands',
1757
		'FM' => 'Federated States of Micronesia',
1758
		'GU' => 'Guam',
1759
		'MH' => 'Marshall Islands',
1760
		'MP' => 'Northern Mariana Islands',
1761
		'PW' => 'Palau',
1762
		'PI' => 'Philippine Islands',
1763
		'PR' => 'Puerto Rico',
1764
		'TT' => 'Trust Territory of the Pacific Islands',
1765
		'VI' => 'Virgin Islands',
1766
		'AA' => 'Armed Forces - Americas',
1767
		'AE' => 'Armed Forces - Europe, Canada, Middle East, Africa',
1768
		'AP' => 'Armed Forces - Pacific'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
1769
	);
1770
1771
	return apply_filters( 'give_us_states', $states );
1772
}
1773
1774
/**
1775
 * Get Provinces List
1776
 *
1777
 * @access      public
1778
 * @since       1.0
1779
 * @return      array
1780
 */
1781
function give_get_provinces_list() {
1782
	$provinces = array(
1783
		''   => '',
1784
		'AB' => esc_html__( 'Alberta', 'give' ),
1785
		'BC' => esc_html__( 'British Columbia', 'give' ),
1786
		'MB' => esc_html__( 'Manitoba', 'give' ),
1787
		'NB' => esc_html__( 'New Brunswick', 'give' ),
1788
		'NL' => esc_html__( 'Newfoundland and Labrador', 'give' ),
1789
		'NS' => esc_html__( 'Nova Scotia', 'give' ),
1790
		'NT' => esc_html__( 'Northwest Territories', 'give' ),
1791
		'NU' => esc_html__( 'Nunavut', 'give' ),
1792
		'ON' => esc_html__( 'Ontario', 'give' ),
1793
		'PE' => esc_html__( 'Prince Edward Island', 'give' ),
1794
		'QC' => esc_html__( 'Quebec', 'give' ),
1795
		'SK' => esc_html__( 'Saskatchewan', 'give' ),
1796
		'YT' => esc_html__( 'Yukon', 'give' )
1797
	);
1798
1799
	return apply_filters( 'give_canada_provinces', $provinces );
1800
}
1801
1802
/**
1803
 * Get Australian States
1804
 *
1805
 * @since 1.0
1806
 * @return array $states A list of states
1807
 */
1808
function give_get_australian_states_list() {
1809
	$states = array(
1810
		''    => '',
1811
		'ACT' => 'Australian Capital Territory',
1812
		'NSW' => 'New South Wales',
1813
		'NT'  => 'Northern Territory',
1814
		'QLD' => 'Queensland',
1815
		'SA'  => 'South Australia',
1816
		'TAS' => 'Tasmania',
1817
		'VIC' => 'Victoria',
1818
		'WA'  => 'Western Australia'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
1819
	);
1820
1821
	return apply_filters( 'give_australian_states', $states );
1822
}
1823
1824
/**
1825
 * Get Brazil States
1826
 *
1827
 * @since 1.0
1828
 * @return array $states A list of states
1829
 */
1830
function give_get_brazil_states_list() {
1831
	$states = array(
1832
		''   => '',
1833
		'AC' => 'Acre',
1834
		'AL' => 'Alagoas',
1835
		'AP' => 'Amap&aacute;',
1836
		'AM' => 'Amazonas',
1837
		'BA' => 'Bahia',
1838
		'CE' => 'Cear&aacute;',
1839
		'DF' => 'Distrito Federal',
1840
		'ES' => 'Esp&iacute;rito Santo',
1841
		'GO' => 'Goi&aacute;s',
1842
		'MA' => 'Maranh&atilde;o',
1843
		'MT' => 'Mato Grosso',
1844
		'MS' => 'Mato Grosso do Sul',
1845
		'MG' => 'Minas Gerais',
1846
		'PA' => 'Par&aacute;',
1847
		'PB' => 'Para&iacute;ba',
1848
		'PR' => 'Paran&aacute;',
1849
		'PE' => 'Pernambuco',
1850
		'PI' => 'Piau&iacute;',
1851
		'RJ' => 'Rio de Janeiro',
1852
		'RN' => 'Rio Grande do Norte',
1853
		'RS' => 'Rio Grande do Sul',
1854
		'RO' => 'Rond&ocirc;nia',
1855
		'RR' => 'Roraima',
1856
		'SC' => 'Santa Catarina',
1857
		'SP' => 'S&atilde;o Paulo',
1858
		'SE' => 'Sergipe',
1859
		'TO' => 'Tocantins'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
1860
	);
1861
1862
	return apply_filters( 'give_brazil_states', $states );
1863
}
1864
1865
/**
1866
 * Get Hong Kong States
1867
 *
1868
 * @since 1.0
1869
 * @return array $states A list of states
1870
 */
1871
function give_get_hong_kong_states_list() {
1872
	$states = array(
1873
		''                => '',
1874
		'HONG KONG'       => 'Hong Kong Island',
1875
		'KOWLOON'         => 'Kowloon',
1876
		'NEW TERRITORIES' => 'New Territories'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
1877
	);
1878
1879
	return apply_filters( 'give_hong_kong_states', $states );
1880
}
1881
1882
/**
1883
 * Get Hungary States
1884
 *
1885
 * @since 1.0
1886
 * @return array $states A list of states
1887
 */
1888
function give_get_hungary_states_list() {
1889
	$states = array(
1890
		''   => '',
1891
		'BK' => 'Bács-Kiskun',
1892
		'BE' => 'Békés',
1893
		'BA' => 'Baranya',
1894
		'BZ' => 'Borsod-Abaúj-Zemplén',
1895
		'BU' => 'Budapest',
1896
		'CS' => 'Csongrád',
1897
		'FE' => 'Fejér',
1898
		'GS' => 'Győr-Moson-Sopron',
1899
		'HB' => 'Hajdú-Bihar',
1900
		'HE' => 'Heves',
1901
		'JN' => 'Jász-Nagykun-Szolnok',
1902
		'KE' => 'Komárom-Esztergom',
1903
		'NO' => 'Nógrád',
1904
		'PE' => 'Pest',
1905
		'SO' => 'Somogy',
1906
		'SZ' => 'Szabolcs-Szatmár-Bereg',
1907
		'TO' => 'Tolna',
1908
		'VA' => 'Vas',
1909
		'VE' => 'Veszprém',
1910
		'ZA' => 'Zala'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
1911
	);
1912
1913
	return apply_filters( 'give_hungary_states', $states );
1914
}
1915
1916
/**
1917
 * Get Chinese States
1918
 *
1919
 * @since 1.0
1920
 * @return array $states A list of states
1921
 */
1922
function give_get_chinese_states_list() {
1923
	$states = array(
1924
		''     => '',
1925
		'CN1'  => 'Yunnan / &#20113;&#21335;',
1926
		'CN2'  => 'Beijing / &#21271;&#20140;',
1927
		'CN3'  => 'Tianjin / &#22825;&#27941;',
1928
		'CN4'  => 'Hebei / &#27827;&#21271;',
1929
		'CN5'  => 'Shanxi / &#23665;&#35199;',
1930
		'CN6'  => 'Inner Mongolia / &#20839;&#33945;&#21476;',
1931
		'CN7'  => 'Liaoning / &#36797;&#23425;',
1932
		'CN8'  => 'Jilin / &#21513;&#26519;',
1933
		'CN9'  => 'Heilongjiang / &#40657;&#40857;&#27743;',
1934
		'CN10' => 'Shanghai / &#19978;&#28023;',
1935
		'CN11' => 'Jiangsu / &#27743;&#33487;',
1936
		'CN12' => 'Zhejiang / &#27993;&#27743;',
1937
		'CN13' => 'Anhui / &#23433;&#24509;',
1938
		'CN14' => 'Fujian / &#31119;&#24314;',
1939
		'CN15' => 'Jiangxi / &#27743;&#35199;',
1940
		'CN16' => 'Shandong / &#23665;&#19996;',
1941
		'CN17' => 'Henan / &#27827;&#21335;',
1942
		'CN18' => 'Hubei / &#28246;&#21271;',
1943
		'CN19' => 'Hunan / &#28246;&#21335;',
1944
		'CN20' => 'Guangdong / &#24191;&#19996;',
1945
		'CN21' => 'Guangxi Zhuang / &#24191;&#35199;&#22766;&#26063;',
1946
		'CN22' => 'Hainan / &#28023;&#21335;',
1947
		'CN23' => 'Chongqing / &#37325;&#24198;',
1948
		'CN24' => 'Sichuan / &#22235;&#24029;',
1949
		'CN25' => 'Guizhou / &#36149;&#24030;',
1950
		'CN26' => 'Shaanxi / &#38485;&#35199;',
1951
		'CN27' => 'Gansu / &#29976;&#32899;',
1952
		'CN28' => 'Qinghai / &#38738;&#28023;',
1953
		'CN29' => 'Ningxia Hui / &#23425;&#22799;',
1954
		'CN30' => 'Macau / &#28595;&#38376;',
1955
		'CN31' => 'Tibet / &#35199;&#34255;',
1956
		'CN32' => 'Xinjiang / &#26032;&#30086;'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
1957
	);
1958
1959
	return apply_filters( 'give_chinese_states', $states );
1960
}
1961
1962
/**
1963
 * Get New Zealand States
1964
 *
1965
 * @since 1.0
1966
 * @return array $states A list of states
1967
 */
1968
function give_get_new_zealand_states_list() {
1969
	$states = array(
1970
		''   => '',
1971
		'AK' => 'Auckland',
1972
		'BP' => 'Bay of Plenty',
1973
		'CT' => 'Canterbury',
1974
		'HB' => 'Hawke&rsquo;s Bay',
1975
		'MW' => 'Manawatu-Wanganui',
1976
		'MB' => 'Marlborough',
1977
		'NS' => 'Nelson',
1978
		'NL' => 'Northland',
1979
		'OT' => 'Otago',
1980
		'SL' => 'Southland',
1981
		'TK' => 'Taranaki',
1982
		'TM' => 'Tasman',
1983
		'WA' => 'Waikato',
1984
		'WE' => 'Wellington',
1985
		'WC' => 'West Coast'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
1986
	);
1987
1988
	return apply_filters( 'give_new_zealand_states', $states );
1989
}
1990
1991
/**
1992
 * Get Indonesian States
1993
 *
1994
 * @since 1.0
1995
 * @return array $states A list of states
1996
 */
1997
function give_get_indonesian_states_list() {
1998
	$states = array(
1999
		''   => '',
2000
		'AC' => 'Daerah Istimewa Aceh',
2001
		'SU' => 'Sumatera Utara',
2002
		'SB' => 'Sumatera Barat',
2003
		'RI' => 'Riau',
2004
		'KR' => 'Kepulauan Riau',
2005
		'JA' => 'Jambi',
2006
		'SS' => 'Sumatera Selatan',
2007
		'BB' => 'Bangka Belitung',
2008
		'BE' => 'Bengkulu',
2009
		'LA' => 'Lampung',
2010
		'JK' => 'DKI Jakarta',
2011
		'JB' => 'Jawa Barat',
2012
		'BT' => 'Banten',
2013
		'JT' => 'Jawa Tengah',
2014
		'JI' => 'Jawa Timur',
2015
		'YO' => 'Daerah Istimewa Yogyakarta',
2016
		'BA' => 'Bali',
2017
		'NB' => 'Nusa Tenggara Barat',
2018
		'NT' => 'Nusa Tenggara Timur',
2019
		'KB' => 'Kalimantan Barat',
2020
		'KT' => 'Kalimantan Tengah',
2021
		'KI' => 'Kalimantan Timur',
2022
		'KS' => 'Kalimantan Selatan',
2023
		'KU' => 'Kalimantan Utara',
2024
		'SA' => 'Sulawesi Utara',
2025
		'ST' => 'Sulawesi Tengah',
2026
		'SG' => 'Sulawesi Tenggara',
2027
		'SR' => 'Sulawesi Barat',
2028
		'SN' => 'Sulawesi Selatan',
2029
		'GO' => 'Gorontalo',
2030
		'MA' => 'Maluku',
2031
		'MU' => 'Maluku Utara',
2032
		'PA' => 'Papua',
2033
		'PB' => 'Papua Barat'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
2034
	);
2035
2036
	return apply_filters( 'give_indonesia_states', $states );
2037
}
2038
2039
/**
2040
 * Get Indian States
2041
 *
2042
 * @since 1.0
2043
 * @return array $states A list of states
2044
 */
2045
function give_get_indian_states_list() {
2046
	$states = array(
2047
		''   => '',
2048
		'AP' => 'Andhra Pradesh',
2049
		'AR' => 'Arunachal Pradesh',
2050
		'AS' => 'Assam',
2051
		'BR' => 'Bihar',
2052
		'CT' => 'Chhattisgarh',
2053
		'GA' => 'Goa',
2054
		'GJ' => 'Gujarat',
2055
		'HR' => 'Haryana',
2056
		'HP' => 'Himachal Pradesh',
2057
		'JK' => 'Jammu and Kashmir',
2058
		'JH' => 'Jharkhand',
2059
		'KA' => 'Karnataka',
2060
		'KL' => 'Kerala',
2061
		'MP' => 'Madhya Pradesh',
2062
		'MH' => 'Maharashtra',
2063
		'MN' => 'Manipur',
2064
		'ML' => 'Meghalaya',
2065
		'MZ' => 'Mizoram',
2066
		'NL' => 'Nagaland',
2067
		'OR' => 'Orissa',
2068
		'PB' => 'Punjab',
2069
		'RJ' => 'Rajasthan',
2070
		'SK' => 'Sikkim',
2071
		'TN' => 'Tamil Nadu',
2072
		'TG' => 'Telangana',
2073
		'TR' => 'Tripura',
2074
		'UT' => 'Uttarakhand',
2075
		'UP' => 'Uttar Pradesh',
2076
		'WB' => 'West Bengal',
2077
		'AN' => 'Andaman and Nicobar Islands',
2078
		'CH' => 'Chandigarh',
2079
		'DN' => 'Dadar and Nagar Haveli',
2080
		'DD' => 'Daman and Diu',
2081
		'DL' => 'Delhi',
2082
		'LD' => 'Lakshadweep',
2083
		'PY' => 'Pondicherry (Puducherry)'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
2084
	);
2085
2086
	return apply_filters( 'give_indian_states', $states );
2087
}
2088
2089
/**
2090
 * Get Malaysian States
2091
 *
2092
 * @since 1.6
2093
 * @return array $states A list of states
2094
 */
2095
function give_get_malaysian_states_list() {
2096
	$states = array(
2097
		''    => '',
2098
		'JHR' => 'Johor',
2099
		'KDH' => 'Kedah',
2100
		'KTN' => 'Kelantan',
2101
		'MLK' => 'Melaka',
2102
		'NSN' => 'Negeri Sembilan',
2103
		'PHG' => 'Pahang',
2104
		'PRK' => 'Perak',
2105
		'PLS' => 'Perlis',
2106
		'PNG' => 'Pulau Pinang',
2107
		'SBH' => 'Sabah',
2108
		'SWK' => 'Sarawak',
2109
		'SGR' => 'Selangor',
2110
		'TRG' => 'Terengganu',
2111
		'KUL' => 'W.P. Kuala Lumpur',
2112
		'LBN' => 'W.P. Labuan',
2113
		'PJY' => 'W.P. Putrajaya'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
2114
	);
2115
2116
	return apply_filters( 'give_malaysian_states', $states );
2117
}
2118
2119
/**
2120
 * Get South African States
2121
 *
2122
 * @since 1.6
2123
 * @return array $states A list of states
2124
 */
2125
function give_get_south_african_states_list() {
2126
	$states = array(
2127
		''    => '',
2128
		'EC'  => 'Eastern Cape',
2129
		'FS'  => 'Free State',
2130
		'GP'  => 'Gauteng',
2131
		'KZN' => 'KwaZulu-Natal',
2132
		'LP'  => 'Limpopo',
2133
		'MP'  => 'Mpumalanga',
2134
		'NC'  => 'Northern Cape',
2135
		'NW'  => 'North West',
2136
		'WC'  => 'Western Cape'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
2137
	);
2138
2139
	return apply_filters( 'give_south_african_states', $states );
2140
}
2141
2142
/**
2143
 * Get Thailand States
2144
 *
2145
 * @since 1.6
2146
 * @return array $states A list of states
2147
 */
2148
function give_get_thailand_states_list() {
2149
	$states = array(
2150
		''      => '',
2151
		'TH-37' => 'Amnat Charoen (&#3629;&#3635;&#3609;&#3634;&#3592;&#3648;&#3592;&#3619;&#3636;&#3597;)',
2152
		'TH-15' => 'Ang Thong (&#3629;&#3656;&#3634;&#3591;&#3607;&#3629;&#3591;)',
2153
		'TH-14' => 'Ayutthaya (&#3614;&#3619;&#3632;&#3609;&#3588;&#3619;&#3624;&#3619;&#3637;&#3629;&#3618;&#3640;&#3608;&#3618;&#3634;)',
2154
		'TH-10' => 'Bangkok (&#3585;&#3619;&#3640;&#3591;&#3648;&#3607;&#3614;&#3617;&#3627;&#3634;&#3609;&#3588;&#3619;)',
2155
		'TH-38' => 'Bueng Kan (&#3610;&#3638;&#3591;&#3585;&#3634;&#3628;)',
2156
		'TH-31' => 'Buri Ram (&#3610;&#3640;&#3619;&#3637;&#3619;&#3633;&#3617;&#3618;&#3660;)',
2157
		'TH-24' => 'Chachoengsao (&#3593;&#3632;&#3648;&#3594;&#3636;&#3591;&#3648;&#3607;&#3619;&#3634;)',
2158
		'TH-18' => 'Chai Nat (&#3594;&#3633;&#3618;&#3609;&#3634;&#3607;)',
2159
		'TH-36' => 'Chaiyaphum (&#3594;&#3633;&#3618;&#3616;&#3641;&#3617;&#3636;)',
2160
		'TH-22' => 'Chanthaburi (&#3592;&#3633;&#3609;&#3607;&#3610;&#3640;&#3619;&#3637;)',
2161
		'TH-50' => 'Chiang Mai (&#3648;&#3594;&#3637;&#3618;&#3591;&#3651;&#3627;&#3617;&#3656;)',
2162
		'TH-57' => 'Chiang Rai (&#3648;&#3594;&#3637;&#3618;&#3591;&#3619;&#3634;&#3618;)',
2163
		'TH-20' => 'Chonburi (&#3594;&#3621;&#3610;&#3640;&#3619;&#3637;)',
2164
		'TH-86' => 'Chumphon (&#3594;&#3640;&#3617;&#3614;&#3619;)',
2165
		'TH-46' => 'Kalasin (&#3585;&#3634;&#3628;&#3626;&#3636;&#3609;&#3608;&#3640;&#3660;)',
2166
		'TH-62' => 'Kamphaeng Phet (&#3585;&#3635;&#3649;&#3614;&#3591;&#3648;&#3614;&#3594;&#3619;)',
2167
		'TH-71' => 'Kanchanaburi (&#3585;&#3634;&#3597;&#3592;&#3609;&#3610;&#3640;&#3619;&#3637;)',
2168
		'TH-40' => 'Khon Kaen (&#3586;&#3629;&#3609;&#3649;&#3585;&#3656;&#3609;)',
2169
		'TH-81' => 'Krabi (&#3585;&#3619;&#3632;&#3610;&#3637;&#3656;)',
2170
		'TH-52' => 'Lampang (&#3621;&#3635;&#3611;&#3634;&#3591;)',
2171
		'TH-51' => 'Lamphun (&#3621;&#3635;&#3614;&#3641;&#3609;)',
2172
		'TH-42' => 'Loei (&#3648;&#3621;&#3618;)',
2173
		'TH-16' => 'Lopburi (&#3621;&#3614;&#3610;&#3640;&#3619;&#3637;)',
2174
		'TH-58' => 'Mae Hong Son (&#3649;&#3617;&#3656;&#3630;&#3656;&#3629;&#3591;&#3626;&#3629;&#3609;)',
2175
		'TH-44' => 'Maha Sarakham (&#3617;&#3627;&#3634;&#3626;&#3634;&#3619;&#3588;&#3634;&#3617;)',
2176
		'TH-49' => 'Mukdahan (&#3617;&#3640;&#3585;&#3604;&#3634;&#3627;&#3634;&#3619;)',
2177
		'TH-26' => 'Nakhon Nayok (&#3609;&#3588;&#3619;&#3609;&#3634;&#3618;&#3585;)',
2178
		'TH-73' => 'Nakhon Pathom (&#3609;&#3588;&#3619;&#3611;&#3600;&#3617;)',
2179
		'TH-48' => 'Nakhon Phanom (&#3609;&#3588;&#3619;&#3614;&#3609;&#3617;)',
2180
		'TH-30' => 'Nakhon Ratchasima (&#3609;&#3588;&#3619;&#3619;&#3634;&#3594;&#3626;&#3637;&#3617;&#3634;)',
2181
		'TH-60' => 'Nakhon Sawan (&#3609;&#3588;&#3619;&#3626;&#3623;&#3619;&#3619;&#3588;&#3660;)',
2182
		'TH-80' => 'Nakhon Si Thammarat (&#3609;&#3588;&#3619;&#3624;&#3619;&#3637;&#3608;&#3619;&#3619;&#3617;&#3619;&#3634;&#3594;)',
2183
		'TH-55' => 'Nan (&#3609;&#3656;&#3634;&#3609;)',
2184
		'TH-96' => 'Narathiwat (&#3609;&#3619;&#3634;&#3608;&#3636;&#3623;&#3634;&#3626;)',
2185
		'TH-39' => 'Nong Bua Lam Phu (&#3627;&#3609;&#3629;&#3591;&#3610;&#3633;&#3623;&#3621;&#3635;&#3616;&#3641;)',
2186
		'TH-43' => 'Nong Khai (&#3627;&#3609;&#3629;&#3591;&#3588;&#3634;&#3618;)',
2187
		'TH-12' => 'Nonthaburi (&#3609;&#3609;&#3607;&#3610;&#3640;&#3619;&#3637;)',
2188
		'TH-13' => 'Pathum Thani (&#3611;&#3607;&#3640;&#3617;&#3608;&#3634;&#3609;&#3637;)',
2189
		'TH-94' => 'Pattani (&#3611;&#3633;&#3605;&#3605;&#3634;&#3609;&#3637;)',
2190
		'TH-82' => 'Phang Nga (&#3614;&#3633;&#3591;&#3591;&#3634;)',
2191
		'TH-93' => 'Phatthalung (&#3614;&#3633;&#3607;&#3621;&#3640;&#3591;)',
2192
		'TH-56' => 'Phayao (&#3614;&#3632;&#3648;&#3618;&#3634;)',
2193
		'TH-67' => 'Phetchabun (&#3648;&#3614;&#3594;&#3619;&#3610;&#3641;&#3619;&#3603;&#3660;)',
2194
		'TH-76' => 'Phetchaburi (&#3648;&#3614;&#3594;&#3619;&#3610;&#3640;&#3619;&#3637;)',
2195
		'TH-66' => 'Phichit (&#3614;&#3636;&#3592;&#3636;&#3605;&#3619;)',
2196
		'TH-65' => 'Phitsanulok (&#3614;&#3636;&#3625;&#3603;&#3640;&#3650;&#3621;&#3585;)',
2197
		'TH-54' => 'Phrae (&#3649;&#3614;&#3619;&#3656;)',
2198
		'TH-83' => 'Phuket (&#3616;&#3641;&#3648;&#3585;&#3655;&#3605;)',
2199
		'TH-25' => 'Prachin Buri (&#3611;&#3619;&#3634;&#3592;&#3637;&#3609;&#3610;&#3640;&#3619;&#3637;)',
2200
		'TH-77' => 'Prachuap Khiri Khan (&#3611;&#3619;&#3632;&#3592;&#3623;&#3610;&#3588;&#3637;&#3619;&#3637;&#3586;&#3633;&#3609;&#3608;&#3660;)',
2201
		'TH-85' => 'Ranong (&#3619;&#3632;&#3609;&#3629;&#3591;)',
2202
		'TH-70' => 'Ratchaburi (&#3619;&#3634;&#3594;&#3610;&#3640;&#3619;&#3637;)',
2203
		'TH-21' => 'Rayong (&#3619;&#3632;&#3618;&#3629;&#3591;)',
2204
		'TH-45' => 'Roi Et (&#3619;&#3657;&#3629;&#3618;&#3648;&#3629;&#3655;&#3604;)',
2205
		'TH-27' => 'Sa Kaeo (&#3626;&#3619;&#3632;&#3649;&#3585;&#3657;&#3623;)',
2206
		'TH-47' => 'Sakon Nakhon (&#3626;&#3585;&#3621;&#3609;&#3588;&#3619;)',
2207
		'TH-11' => 'Samut Prakan (&#3626;&#3617;&#3640;&#3607;&#3619;&#3611;&#3619;&#3634;&#3585;&#3634;&#3619;)',
2208
		'TH-74' => 'Samut Sakhon (&#3626;&#3617;&#3640;&#3607;&#3619;&#3626;&#3634;&#3588;&#3619;)',
2209
		'TH-75' => 'Samut Songkhram (&#3626;&#3617;&#3640;&#3607;&#3619;&#3626;&#3591;&#3588;&#3619;&#3634;&#3617;)',
2210
		'TH-19' => 'Saraburi (&#3626;&#3619;&#3632;&#3610;&#3640;&#3619;&#3637;)',
2211
		'TH-91' => 'Satun (&#3626;&#3605;&#3641;&#3621;)',
2212
		'TH-17' => 'Sing Buri (&#3626;&#3636;&#3591;&#3627;&#3660;&#3610;&#3640;&#3619;&#3637;)',
2213
		'TH-33' => 'Sisaket (&#3624;&#3619;&#3637;&#3626;&#3632;&#3648;&#3585;&#3625;)',
2214
		'TH-90' => 'Songkhla (&#3626;&#3591;&#3586;&#3621;&#3634;)',
2215
		'TH-64' => 'Sukhothai (&#3626;&#3640;&#3650;&#3586;&#3607;&#3633;&#3618;)',
2216
		'TH-72' => 'Suphan Buri (&#3626;&#3640;&#3614;&#3619;&#3619;&#3603;&#3610;&#3640;&#3619;&#3637;)',
2217
		'TH-84' => 'Surat Thani (&#3626;&#3640;&#3619;&#3634;&#3625;&#3598;&#3619;&#3660;&#3608;&#3634;&#3609;&#3637;)',
2218
		'TH-32' => 'Surin (&#3626;&#3640;&#3619;&#3636;&#3609;&#3607;&#3619;&#3660;)',
2219
		'TH-63' => 'Tak (&#3605;&#3634;&#3585;)',
2220
		'TH-92' => 'Trang (&#3605;&#3619;&#3633;&#3591;)',
2221
		'TH-23' => 'Trat (&#3605;&#3619;&#3634;&#3604;)',
2222
		'TH-34' => 'Ubon Ratchathani (&#3629;&#3640;&#3610;&#3621;&#3619;&#3634;&#3594;&#3608;&#3634;&#3609;&#3637;)',
2223
		'TH-41' => 'Udon Thani (&#3629;&#3640;&#3604;&#3619;&#3608;&#3634;&#3609;&#3637;)',
2224
		'TH-61' => 'Uthai Thani (&#3629;&#3640;&#3607;&#3633;&#3618;&#3608;&#3634;&#3609;&#3637;)',
2225
		'TH-53' => 'Uttaradit (&#3629;&#3640;&#3605;&#3619;&#3604;&#3636;&#3605;&#3606;&#3660;)',
2226
		'TH-95' => 'Yala (&#3618;&#3632;&#3621;&#3634;)',
2227
		'TH-35' => 'Yasothon (&#3618;&#3650;&#3626;&#3608;&#3619;)'
0 ignored issues
show
introduced by
Each line in an array declaration must end in a comma
Loading history...
2228
	);
2229
2230
	return apply_filters( 'give_thailand_states', $states );
2231
}
2232
2233
/**
2234
 * Get Spain States
2235
 *
2236
 * @since 1.0
2237
 * @return array $states A list of states
2238
 */
2239
function give_get_spain_states_list() {
2240
	$states = array(
2241
		''   => '',
2242
		'C'  => esc_html__( 'A Coru&ntilde;a', 'give' ),
2243
		'VI' => esc_html__( 'Álava', 'give' ),
2244
		'AB' => esc_html__( 'Albacete', 'give' ),
2245
		'A'  => esc_html__( 'Alicante', 'give' ),
2246
		'AL' => esc_html__( 'Almer&iacute;a', 'give' ),
2247
		'O'  => esc_html__( 'Asturias', 'give' ),
2248
		'AV' => esc_html__( '&Aacute;vila', 'give' ),
2249
		'BA' => esc_html__( 'Badajoz', 'give' ),
2250
		'PM' => esc_html__( 'Baleares', 'give' ),
2251
		'B'  => esc_html__( 'Barcelona', 'give' ),
2252
		'BU' => esc_html__( 'Burgos', 'give' ),
2253
		'CC' => esc_html__( 'C&aacute;ceres', 'give' ),
2254
		'CA' => esc_html__( 'C&aacute;diz', 'give' ),
2255
		'S'  => esc_html__( 'Cantabria', 'give' ),
2256
		'CS' => esc_html__( 'Castell&oacute;n', 'give' ),
2257
		'CE' => esc_html__( 'Ceuta', 'give' ),
2258
		'CR' => esc_html__( 'Ciudad Real', 'give' ),
2259
		'CO' => esc_html__( 'C&oacute;rdoba', 'give' ),
2260
		'CU' => esc_html__( 'Cuenca', 'give' ),
2261
		'GI' => esc_html__( 'Girona', 'give' ),
2262
		'GR' => esc_html__( 'Granada', 'give' ),
2263
		'GU' => esc_html__( 'Guadalajara', 'give' ),
2264
		'SS' => esc_html__( 'Gipuzkoa', 'give' ),
2265
		'H'  => esc_html__( 'Huelva', 'give' ),
2266
		'HU' => esc_html__( 'Huesca', 'give' ),
2267
		'J'  => esc_html__( 'Ja&eacute;n', 'give' ),
2268
		'LO' => esc_html__( 'La Rioja', 'give' ),
2269
		'GC' => esc_html__( 'Las Palmas', 'give' ),
2270
		'LE' => esc_html__( 'Le&oacute;n', 'give' ),
2271
		'L'  => esc_html__( 'Lleida', 'give' ),
2272
		'LU' => esc_html__( 'Lugo', 'give' ),
2273
		'M'  => esc_html__( 'Madrid', 'give' ),
2274
		'MA' => esc_html__( 'M&aacute;laga', 'give' ),
2275
		'ML' => esc_html__( 'Melilla', 'give' ),
2276
		'MU' => esc_html__( 'Murcia', 'give' ),
2277
		'NA' => esc_html__( 'Navarra', 'give' ),
2278
		'OR' => esc_html__( 'Ourense', 'give' ),
2279
		'P'  => esc_html__( 'Palencia', 'give' ),
2280
		'PO' => esc_html__( 'Pontevedra', 'give' ),
2281
		'SA' => esc_html__( 'Salamanca', 'give' ),
2282
		'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ),
2283
		'SG' => esc_html__( 'Segovia', 'give' ),
2284
		'SE' => esc_html__( 'Sevilla', 'give' ),
2285
		'SO' => esc_html__( 'Soria', 'give' ),
2286
		'T'  => esc_html__( 'Tarragona', 'give' ),
2287
		'TE' => esc_html__( 'Teruel', 'give' ),
2288
		'TO' => esc_html__( 'Toledo', 'give' ),
2289
		'V'  => esc_html__( 'Valencia', 'give' ),
2290
		'VA' => esc_html__( 'Valladolid', 'give' ),
2291
		'BI' => esc_html__( 'Bizkaia', 'give' ),
2292
		'ZA' => esc_html__( 'Zamora', 'give' ),
2293
		'Z'  => esc_html__( 'Zaragoza', 'give' )
2294
	);
2295
2296
	return apply_filters( 'give_spain_states', $states );
2297
}
2298