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