Issues (4296)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

includes/country-functions.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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