Test Failed
Push — master ( 35678a...7fea6f )
by Devin
07:20
created
includes/admin/tools/import/class-give-import-donations.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
 		/**
456 456
 		 * @param $option_value
457
-		 * @param $value
457
+		 * @param boolean $value
458 458
 		 *
459 459
 		 * @return string
460 460
 		 */
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 		 *
545 545
 		 * @since 1.8.14
546 546
 		 *
547
-		 * @param $file_id
547
+		 * @param integer $file_id
548 548
 		 *
549 549
 		 * @return bool|int
550 550
 		 */
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
 									   id="recount-stats-submit"
202 202
 									   value="
203 203
 									       <?php
204
-								       /**
205
-								        * Filter to modify donation importer submit button text.
206
-								        *
207
-								        * @since 2.1
208
-								        */
209
-								       echo apply_filters( 'give_import_donation_submit_button_text', __( 'Submit', 'give' ) );
210
-								       ?>
204
+									   /**
205
+									    * Filter to modify donation importer submit button text.
206
+									    *
207
+									    * @since 2.1
208
+									    */
209
+									   echo apply_filters( 'give_import_donation_submit_button_text', __( 'Submit', 'give' ) );
210
+									   ?>
211 211
 											"/>
212 212
 							</th>
213 213
 							<th>
@@ -1079,8 +1079,8 @@  discard block
 block discarded – undo
1079 1079
 		 */
1080 1080
 		private function is_donations_import_page() {
1081 1081
 			return 'import' === give_get_current_setting_tab() &&
1082
-			       isset( $_GET['importer-type'] ) &&
1083
-			       $this->importer_type === give_clean( $_GET['importer-type'] );
1082
+				   isset( $_GET['importer-type'] ) &&
1083
+				   $this->importer_type === give_clean( $_GET['importer-type'] );
1084 1084
 		}
1085 1085
 	}
1086 1086
 
Please login to merge, or discard this patch.
Spacing   +229 added lines, -235 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
  * @since       1.8.14
12 12
  */
13 13
 
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit; // Exit if accessed directly
16 16
 }
17 17
 
18
-if ( ! class_exists( 'Give_Import_Donations' ) ) {
18
+if ( ! class_exists('Give_Import_Donations')) {
19 19
 
20 20
 	/**
21 21
 	 * Give_Import_Donations.
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		 * @access private
67 67
 		 */
68 68
 		private function __construct() {
69
-			self::$per_page = ! empty( $_GET['per_page'] ) ? absint( $_GET['per_page'] ) : self::$per_page;
69
+			self::$per_page = ! empty($_GET['per_page']) ? absint($_GET['per_page']) : self::$per_page;
70 70
 		}
71 71
 
72 72
 		/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		 * @return static
79 79
 		 */
80 80
 		public static function get_instance() {
81
-			if ( null === static::$instance ) {
81
+			if (null === static::$instance) {
82 82
 				self::$instance = new static();
83 83
 			}
84 84
 
@@ -105,27 +105,27 @@  discard block
 block discarded – undo
105 105
 		 * @return void
106 106
 		 */
107 107
 		private function setup_hooks() {
108
-			if ( ! $this->is_donations_import_page() ) {
108
+			if ( ! $this->is_donations_import_page()) {
109 109
 				return;
110 110
 			}
111 111
 
112 112
 			// Do not render main import tools page.
113
-			remove_action( 'give_admin_field_tools_import', array( 'Give_Settings_Import', 'render_import_field', ) );
113
+			remove_action('give_admin_field_tools_import', array('Give_Settings_Import', 'render_import_field',));
114 114
 
115 115
 
116 116
 			// Render donation import page
117
-			add_action( 'give_admin_field_tools_import', array( $this, 'render_page' ) );
117
+			add_action('give_admin_field_tools_import', array($this, 'render_page'));
118 118
 
119 119
 			// Print the HTML.
120
-			add_action( 'give_tools_import_donations_form_start', array( $this, 'html' ), 10 );
120
+			add_action('give_tools_import_donations_form_start', array($this, 'html'), 10);
121 121
 
122 122
 			// Run when form submit.
123
-			add_action( 'give-tools_save_import', array( $this, 'save' ) );
123
+			add_action('give-tools_save_import', array($this, 'save'));
124 124
 
125
-			add_action( 'give-tools_update_notices', array( $this, 'update_notices' ), 11, 1 );
125
+			add_action('give-tools_update_notices', array($this, 'update_notices'), 11, 1);
126 126
 
127 127
 			// Used to add submit button.
128
-			add_action( 'give_tools_import_donations_form_end', array( $this, 'submit' ), 10 );
128
+			add_action('give_tools_import_donations_form_end', array($this, 'submit'), 10);
129 129
 		}
130 130
 
131 131
 		/**
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
 		 *
138 138
 		 * @return mixed
139 139
 		 */
140
-		public function update_notices( $messages ) {
141
-			if ( ! empty( $_GET['tab'] ) && 'import' === give_clean( $_GET['tab'] ) ) {
142
-				unset( $messages['give-setting-updated'] );
140
+		public function update_notices($messages) {
141
+			if ( ! empty($_GET['tab']) && 'import' === give_clean($_GET['tab'])) {
142
+				unset($messages['give-setting-updated']);
143 143
 			}
144 144
 
145 145
 			return $messages;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 		 * @since 1.8.14
152 152
 		 */
153 153
 		public function submit() {
154
-			wp_nonce_field( 'give-save-settings', '_give-save-settings' );
154
+			wp_nonce_field('give-save-settings', '_give-save-settings');
155 155
 			?>
156 156
 			<input type="hidden" class="import-step" id="import-step" name="step"
157 157
 				   value="<?php echo $this->get_step(); ?>"/>
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
 			?>
173 173
 			<section>
174 174
 				<table
175
-						class="widefat export-options-table give-table <?php echo "step-{$step}"; ?> <?php echo( 1 === $step && ! empty( $this->is_csv_valid ) ? 'give-hidden' : '' ); ?>  "
175
+						class="widefat export-options-table give-table <?php echo "step-{$step}"; ?> <?php echo(1 === $step && ! empty($this->is_csv_valid) ? 'give-hidden' : ''); ?>  "
176 176
 						id="<?php echo "step-{$step}"; ?>">
177 177
 					<tbody>
178 178
 					<?php
179
-					switch ( $step ) {
179
+					switch ($step) {
180 180
 						case 1:
181 181
 							$this->render_media_csv();
182 182
 							break;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 						case 4:
193 193
 							$this->import_success();
194 194
 					}
195
-					if ( false === $this->check_for_dropdown_or_import() ) {
195
+					if (false === $this->check_for_dropdown_or_import()) {
196 196
 						?>
197 197
 						<tr valign="top">
198 198
 							<th>
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 								        *
207 207
 								        * @since 2.1
208 208
 								        */
209
-								       echo apply_filters( 'give_import_donation_submit_button_text', __( 'Submit', 'give' ) );
209
+								       echo apply_filters('give_import_donation_submit_button_text', __('Submit', 'give'));
210 210
 								       ?>
211 211
 											"/>
212 212
 							</th>
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 								 *
218 218
 								 * @since 2.1
219 219
 								 */
220
-								do_action( 'give_import_donation_submit_button' );
220
+								do_action('give_import_donation_submit_button');
221 221
 								?>
222 222
 							</th>
223 223
 						</tr>
@@ -237,70 +237,70 @@  discard block
 block discarded – undo
237 237
 		 */
238 238
 		public function import_success() {
239 239
 
240
-			$delete_csv = ( ! empty( $_GET['delete_csv'] ) ? absint( $_GET['delete_csv'] ) : false );
241
-			$csv        = ( ! empty( $_GET['csv'] ) ? absint( $_GET['csv'] ) : false );
242
-			if ( ! empty( $delete_csv ) && ! empty( $csv ) ) {
243
-				wp_delete_attachment( $csv, true );
240
+			$delete_csv = ( ! empty($_GET['delete_csv']) ? absint($_GET['delete_csv']) : false);
241
+			$csv        = ( ! empty($_GET['csv']) ? absint($_GET['csv']) : false);
242
+			if ( ! empty($delete_csv) && ! empty($csv)) {
243
+				wp_delete_attachment($csv, true);
244 244
 			}
245 245
 
246 246
 			$report = give_import_donation_report();
247 247
 
248 248
 			$report_html = array(
249 249
 				'duplicate_donor'    => array(
250
-					__( '%s duplicate %s detected', 'give' ),
251
-					__( '%s duplicate %s will be detected', 'give' ),
252
-					__( 'donor', 'give' ),
253
-					__( 'donors', 'give' ),
250
+					__('%s duplicate %s detected', 'give'),
251
+					__('%s duplicate %s will be detected', 'give'),
252
+					__('donor', 'give'),
253
+					__('donors', 'give'),
254 254
 				),
255 255
 				'create_donor'       => array(
256
-					__( '%s %s created', 'give' ),
257
-					__( '%s %s will be going to get created', 'give' ),
258
-					__( 'donor', 'give' ),
259
-					__( 'donors', 'give' ),
256
+					__('%s %s created', 'give'),
257
+					__('%s %s will be going to get created', 'give'),
258
+					__('donor', 'give'),
259
+					__('donors', 'give'),
260 260
 				),
261 261
 				'create_form'        => array(
262
-					__( '%s donation %s created', 'give' ),
263
-					__( '%s donation %s will be going to get created', 'give' ),
264
-					__( 'form', 'give' ),
265
-					__( 'forms', 'give' ),
262
+					__('%s donation %s created', 'give'),
263
+					__('%s donation %s will be going to get created', 'give'),
264
+					__('form', 'give'),
265
+					__('forms', 'give'),
266 266
 				),
267 267
 				'duplicate_donation' => array(
268
-					__( '%s duplicate %s detected', 'give' ),
269
-					__( '%s duplicate %s will be detected', 'give' ),
270
-					__( 'donation', 'give' ),
271
-					__( 'donations', 'give' ),
268
+					__('%s duplicate %s detected', 'give'),
269
+					__('%s duplicate %s will be detected', 'give'),
270
+					__('donation', 'give'),
271
+					__('donations', 'give'),
272 272
 				),
273 273
 				'create_donation'    => array(
274
-					__( '%s %s imported', 'give' ),
275
-					__( '%s %s will going to get imported', 'give' ),
276
-					__( 'donation', 'give' ),
277
-					__( 'donations', 'give' ),
274
+					__('%s %s imported', 'give'),
275
+					__('%s %s will going to get imported', 'give'),
276
+					__('donation', 'give'),
277
+					__('donations', 'give'),
278 278
 				),
279 279
 			);
280
-			$total       = (int) $_GET['total'];
281
-			-- $total;
280
+			$total = (int) $_GET['total'];
281
+			--$total;
282 282
 			$success = (bool) $_GET['success'];
283
-			$dry_run = empty( $_GET['dry_run'] ) ? 0 : absint( $_GET['dry_run'] );
283
+			$dry_run = empty($_GET['dry_run']) ? 0 : absint($_GET['dry_run']);
284 284
 			?>
285 285
 			<tr valign="top" class="give-import-dropdown">
286 286
 				<th colspan="2">
287 287
 					<h2>
288 288
 						<?php
289
-						if ( $success ) {
290
-							if ( $dry_run ) {
289
+						if ($success) {
290
+							if ($dry_run) {
291 291
 								printf(
292
-									_n( 'Dry run import complete! %s donation processed', 'Dry run import complete! %s donations processed', $total, 'give' ),
292
+									_n('Dry run import complete! %s donation processed', 'Dry run import complete! %s donations processed', $total, 'give'),
293 293
 									"<strong>{$total}</strong>"
294 294
 								);
295 295
 							} else {
296 296
 								printf(
297
-									_n( 'Import complete! %s donation processed', 'Import complete! %s donations processed', $total, 'give' ),
297
+									_n('Import complete! %s donation processed', 'Import complete! %s donations processed', $total, 'give'),
298 298
 									"<strong>{$total}</strong>"
299 299
 								);
300 300
 							}
301 301
 						} else {
302 302
 							printf(
303
-								_n( 'Failed to import %s donation', 'Failed to import %s donations', $total, 'give' ),
303
+								_n('Failed to import %s donation', 'Failed to import %s donations', $total, 'give'),
304 304
 								"<strong>{$total}</strong>"
305 305
 							);
306 306
 						}
@@ -308,16 +308,16 @@  discard block
 block discarded – undo
308 308
 					</h2>
309 309
 
310 310
 					<?php
311
-					$text      = __( 'Import Donation', 'give' );
311
+					$text      = __('Import Donation', 'give');
312 312
 					$query_arg = array(
313 313
 						'post_type' => 'give_forms',
314 314
 						'page'      => 'give-tools',
315 315
 						'tab'       => 'import',
316 316
 					);
317
-					if ( $success ) {
317
+					if ($success) {
318 318
 
319 319
 
320
-						if ( $dry_run ) {
320
+						if ($dry_run) {
321 321
 							$query_arg = array(
322 322
 								'post_type'     => 'give_forms',
323 323
 								'page'          => 'give-tools',
@@ -325,25 +325,25 @@  discard block
 block discarded – undo
325 325
 								'importer-type' => 'import_donations',
326 326
 							);
327 327
 
328
-							$text = __( 'Start Import', 'give' );
328
+							$text = __('Start Import', 'give');
329 329
 						} else {
330 330
 							$query_arg = array(
331 331
 								'post_type' => 'give_forms',
332 332
 								'page'      => 'give-payment-history',
333 333
 							);
334
-							$text      = __( 'View Donations', 'give' );
334
+							$text = __('View Donations', 'give');
335 335
 						}
336 336
 					}
337 337
 
338
-					foreach ( $report as $key => $value ) {
339
-						if ( array_key_exists( $key, $report_html ) && ! empty( $value ) ) {
340
-							$key_name = $report_html[ $key ][2];
341
-							if ( $value > 1 ) {
342
-								$key_name = $report_html[ $key ][3];
338
+					foreach ($report as $key => $value) {
339
+						if (array_key_exists($key, $report_html) && ! empty($value)) {
340
+							$key_name = $report_html[$key][2];
341
+							if ($value > 1) {
342
+								$key_name = $report_html[$key][3];
343 343
 							}
344 344
 							?>
345 345
 							<p>
346
-								<?php printf( $report_html[ $key ][ $dry_run ], $value, $key_name ); ?>
346
+								<?php printf($report_html[$key][$dry_run], $value, $key_name); ?>
347 347
 							</p>
348 348
 							<?php
349 349
 						}
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 
353 353
 					<p>
354 354
 						<a class="button button-large button-secondary"
355
-						   href="<?php echo add_query_arg( $query_arg, admin_url( 'edit.php' ) ); ?>"><?php echo $text; ?></a>
355
+						   href="<?php echo add_query_arg($query_arg, admin_url('edit.php')); ?>"><?php echo $text; ?></a>
356 356
 					</p>
357 357
 				</th>
358 358
 			</tr>
@@ -369,26 +369,26 @@  discard block
 block discarded – undo
369 369
 			give_import_donation_report_reset();
370 370
 
371 371
 			$csv         = (int) $_REQUEST['csv'];
372
-			$delimiter   = ( ! empty( $_REQUEST['delimiter'] ) ? give_clean( $_REQUEST['delimiter'] ) : 'csv' );
372
+			$delimiter   = ( ! empty($_REQUEST['delimiter']) ? give_clean($_REQUEST['delimiter']) : 'csv');
373 373
 			$index_start = 1;
374 374
 			$index_end   = 1;
375 375
 			$next        = true;
376
-			$total       = self::get_csv_total( $csv );
377
-			if ( self::$per_page < $total ) {
378
-				$total_ajax = ceil( $total / self::$per_page );
376
+			$total       = self::get_csv_total($csv);
377
+			if (self::$per_page < $total) {
378
+				$total_ajax = ceil($total / self::$per_page);
379 379
 				$index_end  = self::$per_page;
380 380
 			} else {
381 381
 				$total_ajax = 1;
382 382
 				$index_end  = $total;
383 383
 				$next       = false;
384 384
 			}
385
-			$current_percentage = 100 / ( $total_ajax + 1 );
385
+			$current_percentage = 100 / ($total_ajax + 1);
386 386
 
387 387
 			?>
388 388
 			<tr valign="top" class="give-import-dropdown">
389 389
 				<th colspan="2">
390
-					<h2 id="give-import-title"><?php _e( 'Importing', 'give' ) ?></h2>
391
-					<p class="give-field-description"><?php _e( 'Your donations are now being imported...', 'give' ) ?></p>
390
+					<h2 id="give-import-title"><?php _e('Importing', 'give') ?></h2>
391
+					<p class="give-field-description"><?php _e('Your donations are now being imported...', 'give') ?></p>
392 392
 				</th>
393 393
 			</tr>
394 394
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 						<div style="width: <?php echo $current_percentage; ?>%"></div>
408 408
 					</div>
409 409
 					<input type="hidden" value="3" name="step">
410
-					<input type="hidden" value='<?php echo maybe_serialize( $_REQUEST['mapto'] ); ?>' name="mapto"
410
+					<input type="hidden" value='<?php echo maybe_serialize($_REQUEST['mapto']); ?>' name="mapto"
411 411
 						   class="mapto">
412 412
 					<input type="hidden" value="<?php echo $_REQUEST['csv']; ?>" name="csv" class="csv">
413 413
 					<input type="hidden" value="<?php echo $_REQUEST['mode']; ?>" name="mode" class="mode">
@@ -416,9 +416,9 @@  discard block
 block discarded – undo
416 416
 					<input type="hidden" value="<?php echo $_REQUEST['delete_csv']; ?>" name="delete_csv"
417 417
 						   class="delete_csv">
418 418
 					<input type="hidden" value="<?php echo $delimiter; ?>" name="delimiter">
419
-					<input type="hidden" value="<?php echo absint( $_REQUEST['dry_run'] ); ?>" name="dry_run">
419
+					<input type="hidden" value="<?php echo absint($_REQUEST['dry_run']); ?>" name="dry_run">
420 420
 					<input type="hidden"
421
-						   value='<?php echo maybe_serialize( self::get_importer( $csv, 0, $delimiter ) ); ?>'
421
+						   value='<?php echo maybe_serialize(self::get_importer($csv, 0, $delimiter)); ?>'
422 422
 						   name="main_key"
423 423
 						   class="main_key">
424 424
 				</th>
@@ -433,20 +433,20 @@  discard block
 block discarded – undo
433 433
 		 */
434 434
 		public function check_for_dropdown_or_import() {
435 435
 			$return = true;
436
-			if ( isset( $_REQUEST['mapto'] ) ) {
436
+			if (isset($_REQUEST['mapto'])) {
437 437
 				$mapto = (array) $_REQUEST['mapto'];
438
-				if ( false === in_array( 'form_title', $mapto ) && false === in_array( 'form_id', $mapto ) ) {
439
-					Give_Admin_Settings::add_error( 'give-import-csv-form', __( 'In order to import donations, a column must be mapped to either the "Donation Form Title" or "Donation Form ID" field. Please map a column to one of those fields.', 'give' ) );
438
+				if (false === in_array('form_title', $mapto) && false === in_array('form_id', $mapto)) {
439
+					Give_Admin_Settings::add_error('give-import-csv-form', __('In order to import donations, a column must be mapped to either the "Donation Form Title" or "Donation Form ID" field. Please map a column to one of those fields.', 'give'));
440 440
 					$return = false;
441 441
 				}
442 442
 
443
-				if ( false === in_array( 'amount', $mapto ) ) {
444
-					Give_Admin_Settings::add_error( 'give-import-csv-amount', __( 'In order to import donations, a column must be mapped to the "Amount" field. Please map a column to that field.', 'give' ) );
443
+				if (false === in_array('amount', $mapto)) {
444
+					Give_Admin_Settings::add_error('give-import-csv-amount', __('In order to import donations, a column must be mapped to the "Amount" field. Please map a column to that field.', 'give'));
445 445
 					$return = false;
446 446
 				}
447 447
 
448
-				if ( false === in_array( 'email', $mapto ) && false === in_array( 'donor_id', $mapto ) ) {
449
-					Give_Admin_Settings::add_error( 'give-import-csv-donor', __( 'In order to import donations, a column must be mapped to either the "Donor Email" or "Donor ID" field. Please map a column to that field.', 'give' ) );
448
+				if (false === in_array('email', $mapto) && false === in_array('donor_id', $mapto)) {
449
+					Give_Admin_Settings::add_error('give-import-csv-donor', __('In order to import donations, a column must be mapped to either the "Donor Email" or "Donor ID" field. Please map a column to that field.', 'give'));
450 450
 					$return = false;
451 451
 				}
452 452
 			} else {
@@ -463,10 +463,10 @@  discard block
 block discarded – undo
463 463
 		 */
464 464
 		public function render_dropdown() {
465 465
 			$csv       = (int) $_GET['csv'];
466
-			$delimiter = ( ! empty( $_GET['delimiter'] ) ? give_clean( $_GET['delimiter'] ) : 'csv' );
466
+			$delimiter = ( ! empty($_GET['delimiter']) ? give_clean($_GET['delimiter']) : 'csv');
467 467
 
468 468
 			// TO check if the CSV files that is being add is valid or not if not then redirect to first step again
469
-			if ( ! $this->is_valid_csv( $csv ) ) {
469
+			if ( ! $this->is_valid_csv($csv)) {
470 470
 				$url = give_import_page_url();
471 471
 				?>
472 472
 				<input type="hidden" name="csv_not_valid" class="csv_not_valid" value="<?php echo $url; ?>"/>
@@ -475,11 +475,11 @@  discard block
 block discarded – undo
475 475
 				?>
476 476
 				<tr valign="top" class="give-import-dropdown">
477 477
 					<th colspan="2">
478
-						<h2 id="give-import-title"><?php _e( 'Map CSV fields to donations', 'give' ) ?></h2>
478
+						<h2 id="give-import-title"><?php _e('Map CSV fields to donations', 'give') ?></h2>
479 479
 
480
-						<p class="give-import-donation-required-fields-title"><?php _e( 'Required Fields' ); ?></p>
480
+						<p class="give-import-donation-required-fields-title"><?php _e('Required Fields'); ?></p>
481 481
 
482
-						<p class="give-field-description"><?php _e( 'These fields are required for the import to submitted' ); ?></p>
482
+						<p class="give-field-description"><?php _e('These fields are required for the import to submitted'); ?></p>
483 483
 
484 484
 						<ul class="give-import-donation-required-fields">
485 485
 							<li class="give-import-donation-required-email"
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 								<span class="give-import-donation-required-symbol dashicons dashicons-no-alt"></span>
488 488
 								<span class="give-import-donation-required-text">
489 489
 									<?php
490
-									_e( 'Email Address', 'give' );
490
+									_e('Email Address', 'give');
491 491
 									?>
492 492
 								</span>
493 493
 							</li>
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 								<span class="give-import-donation-required-symbol dashicons dashicons-no-alt"></span>
498 498
 								<span class="give-import-donation-required-text">
499 499
 									<?php
500
-									_e( 'First Name', 'give' );
500
+									_e('First Name', 'give');
501 501
 									?>
502 502
 								</span>
503 503
 							</li>
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 								<span class="give-import-donation-required-symbol dashicons dashicons-no-alt"></span>
508 508
 								<span class="give-import-donation-required-text">
509 509
 									<?php
510
-									_e( 'Donation Amount', 'give' );
510
+									_e('Donation Amount', 'give');
511 511
 									?>
512 512
 								</span>
513 513
 							</li>
@@ -517,32 +517,32 @@  discard block
 block discarded – undo
517 517
 								<span class="give-import-donation-required-symbol dashicons dashicons-no-alt"></span>
518 518
 								<span class="give-import-donation-required-text">
519 519
 									<?php
520
-									_e( 'Form Title or ID', 'give' );
520
+									_e('Form Title or ID', 'give');
521 521
 									?>
522 522
 								</span>
523 523
 							</li>
524 524
 						</ul>
525 525
 
526
-						<p class="give-field-description"><?php _e( 'Select fields from your CSV file to map against donations fields or to ignore during import.', 'give' ) ?></p>
526
+						<p class="give-field-description"><?php _e('Select fields from your CSV file to map against donations fields or to ignore during import.', 'give') ?></p>
527 527
 					</th>
528 528
 				</tr>
529 529
 
530 530
 				<tr valign="top" class="give-import-dropdown">
531
-					<th><b><?php _e( 'Column name', 'give' ); ?></b></th>
532
-					<th><b><?php _e( 'Map to field', 'give' ); ?></b></th>
531
+					<th><b><?php _e('Column name', 'give'); ?></b></th>
532
+					<th><b><?php _e('Map to field', 'give'); ?></b></th>
533 533
 				</tr>
534 534
 
535 535
 				<?php
536
-				$raw_key = $this->get_importer( $csv, 0, $delimiter );
537
-				$mapto   = (array) ( isset( $_REQUEST['mapto'] ) ? $_REQUEST['mapto'] : array() );
536
+				$raw_key = $this->get_importer($csv, 0, $delimiter);
537
+				$mapto   = (array) (isset($_REQUEST['mapto']) ? $_REQUEST['mapto'] : array());
538 538
 
539
-				foreach ( $raw_key as $index => $value ) {
539
+				foreach ($raw_key as $index => $value) {
540 540
 					?>
541 541
 					<tr valign="top" class="give-import-option">
542 542
 						<th><?php echo $value; ?></th>
543 543
 						<th>
544 544
 							<?php
545
-							$this->get_columns( $index, $value, $mapto );
545
+							$this->get_columns($index, $value, $mapto);
546 546
 							?>
547 547
 						</th>
548 548
 					</tr>
@@ -557,14 +557,14 @@  discard block
 block discarded – undo
557 557
 		 *
558 558
 		 * @return string
559 559
 		 */
560
-		public function selected( $option_value, $value ) {
561
-			$option_value = strtolower( $option_value );
562
-			$value        = strtolower( $value );
560
+		public function selected($option_value, $value) {
561
+			$option_value = strtolower($option_value);
562
+			$value        = strtolower($value);
563 563
 
564 564
 			$selected = '';
565
-			if ( stristr( $value, $option_value ) ) {
565
+			if (stristr($value, $option_value)) {
566 566
 				$selected = 'selected';
567
-			} elseif ( strrpos( $value, 'give_' ) && stristr( $option_value, __( 'Import as Meta', 'give' ) ) ) {
567
+			} elseif (strrpos($value, 'give_') && stristr($option_value, __('Import as Meta', 'give'))) {
568 568
 				$selected = 'selected';
569 569
 			}
570 570
 
@@ -583,28 +583,28 @@  discard block
 block discarded – undo
583 583
 		 *
584 584
 		 * @return void
585 585
 		 */
586
-		private function get_columns( $index, $value = false, $mapto = array() ) {
586
+		private function get_columns($index, $value = false, $mapto = array()) {
587 587
 			$default       = give_import_default_options();
588
-			$current_mapto = (string) ( ! empty( $mapto[ $index ] ) ? $mapto[ $index ] : '' );
588
+			$current_mapto = (string) ( ! empty($mapto[$index]) ? $mapto[$index] : '');
589 589
 			?>
590 590
 			<select name="mapto[<?php echo $index; ?>]">
591
-				<?php $this->get_dropdown_option_html( $default, $current_mapto, $value ); ?>
591
+				<?php $this->get_dropdown_option_html($default, $current_mapto, $value); ?>
592 592
 
593
-				<optgroup label="<?php _e( 'Donations', 'give' ); ?>">
593
+				<optgroup label="<?php _e('Donations', 'give'); ?>">
594 594
 					<?php
595
-					$this->get_dropdown_option_html( give_import_donations_options(), $current_mapto, $value );
595
+					$this->get_dropdown_option_html(give_import_donations_options(), $current_mapto, $value);
596 596
 					?>
597 597
 				</optgroup>
598 598
 
599
-				<optgroup label="<?php _e( 'Donors', 'give' ); ?>">
599
+				<optgroup label="<?php _e('Donors', 'give'); ?>">
600 600
 					<?php
601
-					$this->get_dropdown_option_html( give_import_donor_options(), $current_mapto, $value );
601
+					$this->get_dropdown_option_html(give_import_donor_options(), $current_mapto, $value);
602 602
 					?>
603 603
 				</optgroup>
604 604
 
605
-				<optgroup label="<?php _e( 'Forms', 'give' ); ?>">
605
+				<optgroup label="<?php _e('Forms', 'give'); ?>">
606 606
 					<?php
607
-					$this->get_dropdown_option_html( give_import_donation_form_options(), $current_mapto, $value );
607
+					$this->get_dropdown_option_html(give_import_donation_form_options(), $current_mapto, $value);
608 608
 					?>
609 609
 				</optgroup>
610 610
 
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 				 *
616 616
 				 * @since 1.8.15
617 617
 				 */
618
-				do_action( 'give_import_dropdown_option', $index, $value, $mapto, $current_mapto );
618
+				do_action('give_import_dropdown_option', $index, $value, $mapto, $current_mapto);
619 619
 				?>
620 620
 			</select>
621 621
 			<?php
@@ -633,16 +633,16 @@  discard block
 block discarded – undo
633 633
 		 *
634 634
 		 * @return void
635 635
 		 */
636
-		public function get_dropdown_option_html( $options, $current_mapto, $value = false ) {
637
-			foreach ( $options as $option => $option_value ) {
636
+		public function get_dropdown_option_html($options, $current_mapto, $value = false) {
637
+			foreach ($options as $option => $option_value) {
638 638
 				$option_value_texts = (array) $option_value;
639 639
 				$option_text        = $option_value_texts[0];
640 640
 
641
-				$checked = ( ( $current_mapto === $option ) ? 'selected' : false );
642
-				if ( empty( $checked ) ) {
643
-					foreach ( $option_value_texts as $option_value_text ) {
644
-						$checked = $this->selected( $option_value_text, $value );
645
-						if ( $checked ) {
641
+				$checked = (($current_mapto === $option) ? 'selected' : false);
642
+				if (empty($checked)) {
643
+					foreach ($option_value_texts as $option_value_text) {
644
+						$checked = $this->selected($option_value_text, $value);
645
+						if ($checked) {
646 646
 							break;
647 647
 						}
648 648
 					}
@@ -666,12 +666,12 @@  discard block
 block discarded – undo
666 666
 		 *
667 667
 		 * @return bool|int
668 668
 		 */
669
-		public function get_csv_total( $file_id ) {
669
+		public function get_csv_total($file_id) {
670 670
 			$total = false;
671
-			if ( $file_id ) {
672
-				$file_dir = get_attached_file( $file_id );
673
-				if ( $file_dir ) {
674
-					$total = $this->get_csv_data_from_file_dir( $file_dir );
671
+			if ($file_id) {
672
+				$file_dir = get_attached_file($file_id);
673
+				if ($file_dir) {
674
+					$total = $this->get_csv_data_from_file_dir($file_dir);
675 675
 				}
676 676
 			}
677 677
 
@@ -687,11 +687,11 @@  discard block
 block discarded – undo
687 687
 		 *
688 688
 		 * @return bool|int
689 689
 		 */
690
-		public function get_csv_data_from_file_dir( $file_dir ) {
690
+		public function get_csv_data_from_file_dir($file_dir) {
691 691
 			$total = false;
692
-			if ( $file_dir ) {
693
-				$file = new SplFileObject( $file_dir, 'r' );
694
-				$file->seek( PHP_INT_MAX );
692
+			if ($file_dir) {
693
+				$file = new SplFileObject($file_dir, 'r');
694
+				$file->seek(PHP_INT_MAX);
695 695
 				$total = $file->key() + 1;
696 696
 			}
697 697
 
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 		 *
710 710
 		 * @return array|bool $raw_data title of the CSV file fields
711 711
 		 */
712
-		public function get_importer( $file_id, $index = 0, $delimiter = 'csv' ) {
712
+		public function get_importer($file_id, $index = 0, $delimiter = 'csv') {
713 713
 			/**
714 714
 			 * Filter to modify delimiter of Import.
715 715
 			 *
@@ -717,16 +717,16 @@  discard block
 block discarded – undo
717 717
 			 *
718 718
 			 * Return string $delimiter.
719 719
 			 */
720
-			$delimiter = (string) apply_filters( 'give_import_delimiter_set', $delimiter );
720
+			$delimiter = (string) apply_filters('give_import_delimiter_set', $delimiter);
721 721
 
722 722
 			$raw_data = false;
723
-			$file_dir = get_attached_file( $file_id );
724
-			if ( $file_dir ) {
725
-				if ( false !== ( $handle = fopen( $file_dir, 'r' ) ) ) {
726
-					$raw_data = fgetcsv( $handle, $index, $delimiter );
723
+			$file_dir = get_attached_file($file_id);
724
+			if ($file_dir) {
725
+				if (false !== ($handle = fopen($file_dir, 'r'))) {
726
+					$raw_data = fgetcsv($handle, $index, $delimiter);
727 727
 					// Remove BOM signature from the first item.
728
-					if ( isset( $raw_data[0] ) ) {
729
-						$raw_data[0] = $this->remove_utf8_bom( $raw_data[0] );
728
+					if (isset($raw_data[0])) {
729
+						$raw_data[0] = $this->remove_utf8_bom($raw_data[0]);
730 730
 					}
731 731
 				}
732 732
 			}
@@ -743,9 +743,9 @@  discard block
 block discarded – undo
743 743
 		 *
744 744
 		 * @return string
745 745
 		 */
746
-		public function remove_utf8_bom( $string ) {
747
-			if ( 'efbbbf' === substr( bin2hex( $string ), 0, 6 ) ) {
748
-				$string = substr( $string, 3 );
746
+		public function remove_utf8_bom($string) {
747
+			if ('efbbbf' === substr(bin2hex($string), 0, 6)) {
748
+				$string = substr($string, 3);
749 749
 			}
750 750
 
751 751
 			return $string;
@@ -760,17 +760,17 @@  discard block
 block discarded – undo
760 760
 			$step = $this->get_step();
761 761
 			?>
762 762
 			<ol class="give-progress-steps">
763
-				<li class="<?php echo( 1 === $step ? 'active' : '' ); ?>">
764
-					<?php _e( 'Upload CSV file', 'give' ); ?>
763
+				<li class="<?php echo(1 === $step ? 'active' : ''); ?>">
764
+					<?php _e('Upload CSV file', 'give'); ?>
765 765
 				</li>
766
-				<li class="<?php echo( 2 === $step ? 'active' : '' ); ?>">
767
-					<?php _e( 'Column mapping', 'give' ); ?>
766
+				<li class="<?php echo(2 === $step ? 'active' : ''); ?>">
767
+					<?php _e('Column mapping', 'give'); ?>
768 768
 				</li>
769
-				<li class="<?php echo( 3 === $step ? 'active' : '' ); ?>">
770
-					<?php _e( 'Import', 'give' ); ?>
769
+				<li class="<?php echo(3 === $step ? 'active' : ''); ?>">
770
+					<?php _e('Import', 'give'); ?>
771 771
 				</li>
772
-				<li class="<?php echo( 4 === $step ? 'active' : '' ); ?>">
773
-					<?php _e( 'Done!', 'give' ); ?>
772
+				<li class="<?php echo(4 === $step ? 'active' : ''); ?>">
773
+					<?php _e('Done!', 'give'); ?>
774 774
 				</li>
775 775
 			</ol>
776 776
 			<?php
@@ -784,16 +784,16 @@  discard block
 block discarded – undo
784 784
 		 * @return int $step on which step doest the import is on.
785 785
 		 */
786 786
 		public function get_step() {
787
-			$step    = (int) ( isset( $_REQUEST['step'] ) ? give_clean( $_REQUEST['step'] ) : 0 );
787
+			$step    = (int) (isset($_REQUEST['step']) ? give_clean($_REQUEST['step']) : 0);
788 788
 			$on_step = 1;
789 789
 
790
-			if ( empty( $step ) || 1 === $step ) {
790
+			if (empty($step) || 1 === $step) {
791 791
 				$on_step = 1;
792
-			} elseif ( $this->check_for_dropdown_or_import() ) {
792
+			} elseif ($this->check_for_dropdown_or_import()) {
793 793
 				$on_step = 3;
794
-			} elseif ( 2 === $step ) {
794
+			} elseif (2 === $step) {
795 795
 				$on_step = 2;
796
-			} elseif ( 4 === $step ) {
796
+			} elseif (4 === $step) {
797 797
 				$on_step = 4;
798 798
 			}
799 799
 
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
 		 * @since 1.8.14
807 807
 		 */
808 808
 		public function render_page() {
809
-			include_once GIVE_PLUGIN_DIR . 'includes/admin/tools/views/html-admin-page-import-donations.php';
809
+			include_once GIVE_PLUGIN_DIR.'includes/admin/tools/views/html-admin-page-import-donations.php';
810 810
 		}
811 811
 
812 812
 		/**
@@ -815,18 +815,18 @@  discard block
 block discarded – undo
815 815
 		 * @since 2.1
816 816
 		 */
817 817
 		public function give_import_donation_submit_button_render_media_csv() {
818
-			$dry_run = isset( $_POST['dry_run'] ) ? absint( $_POST['dry_run'] ) : 1;
818
+			$dry_run = isset($_POST['dry_run']) ? absint($_POST['dry_run']) : 1;
819 819
 			?>
820 820
 			<div>
821 821
 				<label for="dry_run">
822 822
 					<input type="hidden" name="dry_run" value="0"/>
823 823
 					<input type="checkbox" name="dry_run" id="dry_run" class="dry_run"
824
-						   value="1" <?php checked( 1, $dry_run ); ?> >
825
-					<strong><?php _e( 'Dry Run', 'give' ); ?></strong>
824
+						   value="1" <?php checked(1, $dry_run); ?> >
825
+					<strong><?php _e('Dry Run', 'give'); ?></strong>
826 826
 				</label>
827 827
 				<p class="give-field-description">
828 828
 					<?php
829
-					_e( 'Preview what the import would look like without making any default changes to your site or your database.', 'give' );
829
+					_e('Preview what the import would look like without making any default changes to your site or your database.', 'give');
830 830
 					?>
831 831
 				</p>
832 832
 			</div>
@@ -842,8 +842,8 @@  discard block
 block discarded – undo
842 842
 		 *
843 843
 		 * @return string
844 844
 		 */
845
-		function give_import_donation_submit_text_render_media_csv( $text ) {
846
-			return __( 'Begin Import', 'give' );
845
+		function give_import_donation_submit_text_render_media_csv($text) {
846
+			return __('Begin Import', 'give');
847 847
 		}
848 848
 
849 849
 		/**
@@ -855,60 +855,57 @@  discard block
 block discarded – undo
855 855
 		 * @return void
856 856
 		 */
857 857
 		public function render_media_csv() {
858
-			add_filter( 'give_import_donation_submit_button_text', array(
858
+			add_filter('give_import_donation_submit_button_text', array(
859 859
 				$this,
860 860
 				'give_import_donation_submit_text_render_media_csv'
861
-			) );
862
-			add_action( 'give_import_donation_submit_button', array(
861
+			));
862
+			add_action('give_import_donation_submit_button', array(
863 863
 				$this,
864 864
 				'give_import_donation_submit_button_render_media_csv'
865
-			) );
865
+			));
866 866
 			?>
867 867
 			<tr valign="top">
868 868
 				<th colspan="2">
869
-					<h2 id="give-import-title"><?php _e( 'Import donations from a CSV file', 'give' ) ?></h2>
870
-					<p class="give-field-description"><?php _e( 'This tool allows you to import or add donation data to your give form(s) via a CSV file.', 'give' ) ?></p>
869
+					<h2 id="give-import-title"><?php _e('Import donations from a CSV file', 'give') ?></h2>
870
+					<p class="give-field-description"><?php _e('This tool allows you to import or add donation data to your give form(s) via a CSV file.', 'give') ?></p>
871 871
 				</th>
872 872
 			</tr>
873 873
 			<?php
874
-			$csv         = ( isset( $_POST['csv'] ) ? give_clean( $_POST['csv'] ) : '' );
875
-			$csv_id      = ( isset( $_POST['csv_id'] ) ? give_clean( $_POST['csv_id'] ) : '' );
876
-			$delimiter   = ( isset( $_POST['delimiter'] ) ? give_clean( $_POST['delimiter'] ) : 'csv' );
877
-			$mode        = empty( $_POST['mode'] ) ?
878
-				'disabled' :
879
-				( give_is_setting_enabled( give_clean( $_POST['mode'] ) ) ? 'enabled' : 'disabled' );
880
-			$create_user = empty( $_POST['create_user'] ) ?
881
-				'disabled' :
882
-				( give_is_setting_enabled( give_clean( $_POST['create_user'] ) ) ? 'enabled' : 'disabled' );
883
-			$delete_csv  = empty( $_POST['delete_csv'] ) ?
884
-				'enabled' :
885
-				( give_is_setting_enabled( give_clean( $_POST['delete_csv'] ) ) ? 'enabled' : 'disabled' );
874
+			$csv         = (isset($_POST['csv']) ? give_clean($_POST['csv']) : '');
875
+			$csv_id      = (isset($_POST['csv_id']) ? give_clean($_POST['csv_id']) : '');
876
+			$delimiter   = (isset($_POST['delimiter']) ? give_clean($_POST['delimiter']) : 'csv');
877
+			$mode        = empty($_POST['mode']) ?
878
+				'disabled' : (give_is_setting_enabled(give_clean($_POST['mode'])) ? 'enabled' : 'disabled');
879
+			$create_user = empty($_POST['create_user']) ?
880
+				'disabled' : (give_is_setting_enabled(give_clean($_POST['create_user'])) ? 'enabled' : 'disabled');
881
+			$delete_csv  = empty($_POST['delete_csv']) ?
882
+				'enabled' : (give_is_setting_enabled(give_clean($_POST['delete_csv'])) ? 'enabled' : 'disabled');
886 883
 
887 884
 			// Reset csv and csv_id if csv
888
-			if ( empty( $csv_id ) || ! $this->is_valid_csv( $csv_id, $csv ) ) {
885
+			if (empty($csv_id) || ! $this->is_valid_csv($csv_id, $csv)) {
889 886
 				$csv_id = $csv = '';
890 887
 			}
891
-			$per_page = isset( $_POST['per_page'] ) ? absint( $_POST['per_page'] ) : self::$per_page;
888
+			$per_page = isset($_POST['per_page']) ? absint($_POST['per_page']) : self::$per_page;
892 889
 
893 890
 			$sample_file_text = sprintf(
894 891
 				'%s <a href="%s">%s</a>.',
895
-				__( 'Download the sample file', 'give' ),
896
-				esc_url( GIVE_PLUGIN_URL . 'sample-data/sample-data.csv' ),
897
-				__( 'here', 'give' )
892
+				__('Download the sample file', 'give'),
893
+				esc_url(GIVE_PLUGIN_URL.'sample-data/sample-data.csv'),
894
+				__('here', 'give')
898 895
 			);
899 896
 
900 897
 			$csv_description = sprintf(
901 898
 				'%1$s %2$s',
902
-				__( 'The file must be a Comma Seperated Version (CSV) file type only.', 'give' ),
899
+				__('The file must be a Comma Seperated Version (CSV) file type only.', 'give'),
903 900
 				$sample_file_text
904 901
 			);
905 902
 
906 903
 			$settings = array(
907 904
 				array(
908 905
 					'id'          => 'csv',
909
-					'name'        => __( 'Choose a CSV file:', 'give' ),
906
+					'name'        => __('Choose a CSV file:', 'give'),
910 907
 					'type'        => 'file',
911
-					'attributes'  => array( 'editing' => 'false', 'library' => 'text' ),
908
+					'attributes'  => array('editing' => 'false', 'library' => 'text'),
912 909
 					'description' => $csv_description,
913 910
 					'fvalue'      => 'url',
914 911
 					'default'     => $csv,
@@ -920,62 +917,62 @@  discard block
 block discarded – undo
920 917
 				),
921 918
 				array(
922 919
 					'id'          => 'delimiter',
923
-					'name'        => __( 'CSV Delimiter:', 'give' ),
924
-					'description' => __( 'In case your CSV file supports a different type of separator (or delimiter) -- like a tab or space -- you can set that here.', 'give' ),
920
+					'name'        => __('CSV Delimiter:', 'give'),
921
+					'description' => __('In case your CSV file supports a different type of separator (or delimiter) -- like a tab or space -- you can set that here.', 'give'),
925 922
 					'default'     => $delimiter,
926 923
 					'type'        => 'select',
927 924
 					'options'     => array(
928
-						'csv'                  => __( 'Comma', 'give' ),
929
-						'tab-separated-values' => __( 'Tab', 'give' ),
925
+						'csv'                  => __('Comma', 'give'),
926
+						'tab-separated-values' => __('Tab', 'give'),
930 927
 					),
931 928
 				),
932 929
 				array(
933 930
 					'id'          => 'mode',
934
-					'name'        => __( 'Test Mode:', 'give' ),
935
-					'description' => __( 'Select whether you would like these donations to be marked as "test" donations within the database. By default, they will be marked as live donations.', 'give' ),
931
+					'name'        => __('Test Mode:', 'give'),
932
+					'description' => __('Select whether you would like these donations to be marked as "test" donations within the database. By default, they will be marked as live donations.', 'give'),
936 933
 					'default'     => $mode,
937 934
 					'type'        => 'radio_inline',
938 935
 					'options'     => array(
939
-						'enabled'  => __( 'Enabled', 'give' ),
940
-						'disabled' => __( 'Disabled', 'give' ),
936
+						'enabled'  => __('Enabled', 'give'),
937
+						'disabled' => __('Disabled', 'give'),
941 938
 					),
942 939
 				),
943 940
 				array(
944 941
 					'id'          => 'create_user',
945
-					'name'        => __( 'Create WP users for new donors:', 'give' ),
946
-					'description' => __( 'The importer can create WordPress user accounts based on the names and email addresses of the donations in your CSV file. Enable this option if you\'d like the importer to do that.', 'give' ),
942
+					'name'        => __('Create WP users for new donors:', 'give'),
943
+					'description' => __('The importer can create WordPress user accounts based on the names and email addresses of the donations in your CSV file. Enable this option if you\'d like the importer to do that.', 'give'),
947 944
 					'default'     => $create_user,
948 945
 					'type'        => 'radio_inline',
949 946
 					'options'     => array(
950
-						'enabled'  => __( 'Enabled', 'give' ),
951
-						'disabled' => __( 'Disabled', 'give' ),
947
+						'enabled'  => __('Enabled', 'give'),
948
+						'disabled' => __('Disabled', 'give'),
952 949
 					),
953 950
 				),
954 951
 				array(
955 952
 					'id'          => 'delete_csv',
956
-					'name'        => __( 'Delete CSV after import:', 'give' ),
957
-					'description' => __( 'Your CSV file will be uploaded via the WordPress Media Library. It\'s a good idea to delete it after the import is finished so that your sensitive data is not accessible on the web. Disable this only if you plan to delete the file manually later.', 'give' ),
953
+					'name'        => __('Delete CSV after import:', 'give'),
954
+					'description' => __('Your CSV file will be uploaded via the WordPress Media Library. It\'s a good idea to delete it after the import is finished so that your sensitive data is not accessible on the web. Disable this only if you plan to delete the file manually later.', 'give'),
958 955
 					'default'     => $delete_csv,
959 956
 					'type'        => 'radio_inline',
960 957
 					'options'     => array(
961
-						'enabled'  => __( 'Enabled', 'give' ),
962
-						'disabled' => __( 'Disabled', 'give' ),
958
+						'enabled'  => __('Enabled', 'give'),
959
+						'disabled' => __('Disabled', 'give'),
963 960
 					),
964 961
 				),
965 962
 				array(
966 963
 					'id'          => 'per_page',
967
-					'name'        => __( 'Process Rows Per Batch:', 'give' ),
964
+					'name'        => __('Process Rows Per Batch:', 'give'),
968 965
 					'type'        => 'number',
969
-					'description' => __( 'Determine how many rows you would like to import per cycle.', 'give' ),
966
+					'description' => __('Determine how many rows you would like to import per cycle.', 'give'),
970 967
 					'default'     => $per_page,
971 968
 					'class'       => 'give-text-small',
972 969
 				),
973 970
 			);
974 971
 
975
-			$settings = apply_filters( 'give_import_file_upload_html', $settings );
972
+			$settings = apply_filters('give_import_file_upload_html', $settings);
976 973
 
977
-			if ( empty( $this->is_csv_valid ) ) {
978
-				Give_Admin_Settings::output_fields( $settings, 'give_settings' );
974
+			if (empty($this->is_csv_valid)) {
975
+				Give_Admin_Settings::output_fields($settings, 'give_settings');
979 976
 			} else {
980 977
 				?>
981 978
 				<input type="hidden" name="is_csv_valid" class="is_csv_valid"
@@ -994,28 +991,25 @@  discard block
 block discarded – undo
994 991
 			$step = $this->get_step();
995 992
 
996 993
 			// Validation for first step.
997
-			if ( 1 === $step ) {
998
-				$csv_id = absint( $_POST['csv_id'] );
994
+			if (1 === $step) {
995
+				$csv_id = absint($_POST['csv_id']);
999 996
 
1000
-				if ( $this->is_valid_csv( $csv_id, esc_url( $_POST['csv'] ) ) ) {
997
+				if ($this->is_valid_csv($csv_id, esc_url($_POST['csv']))) {
1001 998
 
1002
-					$url = give_import_page_url( (array) apply_filters( 'give_import_step_two_url', array(
999
+					$url = give_import_page_url((array) apply_filters('give_import_step_two_url', array(
1003 1000
 						'step'          => '2',
1004 1001
 						'importer-type' => $this->importer_type,
1005 1002
 						'csv'           => $csv_id,
1006
-						'delimiter'     => isset( $_REQUEST['delimiter'] ) ? give_clean( $_REQUEST['delimiter'] ) : 'csv',
1007
-						'mode'          => empty( $_POST['mode'] ) ?
1008
-							'0' :
1009
-							( give_is_setting_enabled( give_clean( $_POST['mode'] ) ) ? '1' : '0' ),
1010
-						'create_user'   => empty( $_POST['create_user'] ) ?
1011
-							'0' :
1012
-							( give_is_setting_enabled( give_clean( $_POST['create_user'] ) ) ? '1' : '0' ),
1013
-						'delete_csv'    => empty( $_POST['delete_csv'] ) ?
1014
-							'1' :
1015
-							( give_is_setting_enabled( give_clean( $_POST['delete_csv'] ) ) ? '1' : '0' ),
1016
-						'per_page'      => isset( $_POST['per_page'] ) ? absint( $_POST['per_page'] ) : self::$per_page,
1017
-						'dry_run'       => isset( $_POST['dry_run'] ) ? absint( $_POST['dry_run'] ) : 0,
1018
-					) ) );
1003
+						'delimiter'     => isset($_REQUEST['delimiter']) ? give_clean($_REQUEST['delimiter']) : 'csv',
1004
+						'mode'          => empty($_POST['mode']) ?
1005
+							'0' : (give_is_setting_enabled(give_clean($_POST['mode'])) ? '1' : '0'),
1006
+						'create_user'   => empty($_POST['create_user']) ?
1007
+							'0' : (give_is_setting_enabled(give_clean($_POST['create_user'])) ? '1' : '0'),
1008
+						'delete_csv'    => empty($_POST['delete_csv']) ?
1009
+							'1' : (give_is_setting_enabled(give_clean($_POST['delete_csv'])) ? '1' : '0'),
1010
+						'per_page'      => isset($_POST['per_page']) ? absint($_POST['per_page']) : self::$per_page,
1011
+						'dry_run'       => isset($_POST['dry_run']) ? absint($_POST['dry_run']) : 0,
1012
+					)));
1019 1013
 
1020 1014
 					$this->is_csv_valid = $url;
1021 1015
 				}
@@ -1033,25 +1027,25 @@  discard block
 block discarded – undo
1033 1027
 		 *
1034 1028
 		 * @return bool $has_error CSV is valid or not.
1035 1029
 		 */
1036
-		private function is_valid_csv( $csv = false, $match_url = '' ) {
1030
+		private function is_valid_csv($csv = false, $match_url = '') {
1037 1031
 			$is_valid_csv = true;
1038 1032
 
1039
-			if ( $csv ) {
1040
-				$csv_url = wp_get_attachment_url( $csv );
1033
+			if ($csv) {
1034
+				$csv_url = wp_get_attachment_url($csv);
1041 1035
 
1042
-				$delimiter = ( ! empty( $_REQUEST['delimiter'] ) ? give_clean( $_REQUEST['delimiter'] ) : 'csv' );
1036
+				$delimiter = ( ! empty($_REQUEST['delimiter']) ? give_clean($_REQUEST['delimiter']) : 'csv');
1043 1037
 
1044 1038
 				if (
1045 1039
 					! $csv_url ||
1046
-					( ! empty( $match_url ) && ( $csv_url !== $match_url ) ) ||
1047
-					( ( $mime_type = get_post_mime_type( $csv ) ) && ! strpos( $mime_type, $delimiter ) )
1040
+					( ! empty($match_url) && ($csv_url !== $match_url)) ||
1041
+					(($mime_type = get_post_mime_type($csv)) && ! strpos($mime_type, $delimiter))
1048 1042
 				) {
1049 1043
 					$is_valid_csv = false;
1050
-					Give_Admin_Settings::add_error( 'give-import-csv', __( 'Please upload or provide a valid CSV file.', 'give' ) );
1044
+					Give_Admin_Settings::add_error('give-import-csv', __('Please upload or provide a valid CSV file.', 'give'));
1051 1045
 				}
1052 1046
 			} else {
1053 1047
 				$is_valid_csv = false;
1054
-				Give_Admin_Settings::add_error( 'give-import-csv', __( 'Please upload or provide a valid CSV file.', 'give' ) );
1048
+				Give_Admin_Settings::add_error('give-import-csv', __('Please upload or provide a valid CSV file.', 'give'));
1055 1049
 			}
1056 1050
 
1057 1051
 			return $is_valid_csv;
@@ -1067,8 +1061,8 @@  discard block
 block discarded – undo
1067 1061
 		 * @param $field
1068 1062
 		 * @param $option_value
1069 1063
 		 */
1070
-		public function render_import_field( $field, $option_value ) {
1071
-			include_once GIVE_PLUGIN_DIR . 'includes/admin/tools/views/html-admin-page-imports.php';
1064
+		public function render_import_field($field, $option_value) {
1065
+			include_once GIVE_PLUGIN_DIR.'includes/admin/tools/views/html-admin-page-imports.php';
1072 1066
 		}
1073 1067
 
1074 1068
 		/**
@@ -1079,8 +1073,8 @@  discard block
 block discarded – undo
1079 1073
 		 */
1080 1074
 		private function is_donations_import_page() {
1081 1075
 			return 'import' === give_get_current_setting_tab() &&
1082
-			       isset( $_GET['importer-type'] ) &&
1083
-			       $this->importer_type === give_clean( $_GET['importer-type'] );
1076
+			       isset($_GET['importer-type']) &&
1077
+			       $this->importer_type === give_clean($_GET['importer-type']);
1084 1078
 		}
1085 1079
 	}
1086 1080
 
Please login to merge, or discard this patch.
includes/price-functions.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @return bool true if has variable prices, false otherwise
25 25
  */
26
-function give_has_variable_prices( $form_id = 0 ) {
26
+function give_has_variable_prices($form_id = 0) {
27 27
 
28
-	if ( empty( $form_id ) ) {
28
+	if (empty($form_id)) {
29 29
 		return false;
30 30
 	}
31 31
 
32
-	$form = new Give_Donate_Form( $form_id );
32
+	$form = new Give_Donate_Form($form_id);
33 33
 
34 34
 	return $form->has_variable_prices();
35 35
 }
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
  *
45 45
  * @return array|bool Variable prices
46 46
  */
47
-function give_get_variable_prices( $form_id = 0 ) {
47
+function give_get_variable_prices($form_id = 0) {
48 48
 
49
-	if ( empty( $form_id ) ) {
49
+	if (empty($form_id)) {
50 50
 		return false;
51 51
 	}
52 52
 
53
-	$form = new Give_Donate_Form( $form_id );
53
+	$form = new Give_Donate_Form($form_id);
54 54
 
55 55
 	return $form->prices;
56 56
 
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
  *
66 66
  * @return array Variable prices
67 67
  */
68
-function give_get_variable_price_ids( $form_id = 0 ) {
69
-	if( ! ( $prices = give_get_variable_prices( $form_id ) ) ) {
68
+function give_get_variable_price_ids($form_id = 0) {
69
+	if ( ! ($prices = give_get_variable_prices($form_id))) {
70 70
 		return array();
71 71
 	}
72 72
 
73 73
 	$price_ids = array();
74
-	foreach ( $prices as $price ){
74
+	foreach ($prices as $price) {
75 75
 		$price_ids[] = $price['_give_id']['level_id'];
76 76
 	}
77 77
 
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
  *
90 90
  * @return string $default_price
91 91
  */
92
-function give_get_default_multilevel_amount( $form_id ) {
92
+function give_get_default_multilevel_amount($form_id) {
93 93
 	$default_price = '1.00';
94
-	$prices        = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id );
94
+	$prices        = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id);
95 95
 
96
-	foreach ( $prices as $price ) {
96
+	foreach ($prices as $price) {
97 97
 
98
-		if ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) {
98
+		if (isset($price['_give_default']) && $price['_give_default'] === 'default') {
99 99
 			$default_price = $price['_give_amount'];
100 100
 		}
101 101
 
@@ -116,19 +116,19 @@  discard block
 block discarded – undo
116 116
  * @return string $default_price
117 117
  * @since      1.0
118 118
  */
119
-function give_get_default_form_amount( $form_id ) {
119
+function give_get_default_form_amount($form_id) {
120 120
 
121
-	if ( give_has_variable_prices( $form_id ) ) {
121
+	if (give_has_variable_prices($form_id)) {
122 122
 
123
-		$default_amount = give_get_default_multilevel_amount( $form_id );
123
+		$default_amount = give_get_default_multilevel_amount($form_id);
124 124
 
125 125
 	} else {
126 126
 
127
-		$default_amount = give_get_meta( $form_id, '_give_set_price', true );
127
+		$default_amount = give_get_meta($form_id, '_give_set_price', true);
128 128
 
129 129
 	}
130 130
 
131
-	return apply_filters( 'give_default_form_amount', $default_amount, $form_id );
131
+	return apply_filters('give_default_form_amount', $default_amount, $form_id);
132 132
 
133 133
 }
134 134
 
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
  *
147 147
  * @return bool
148 148
  */
149
-function give_is_custom_price_mode( $form_id = 0 ) {
149
+function give_is_custom_price_mode($form_id = 0) {
150 150
 
151
-	if ( empty( $form_id ) ) {
151
+	if (empty($form_id)) {
152 152
 		return false;
153 153
 	}
154 154
 
155
-	$form = new Give_Donate_Form( $form_id );
155
+	$form = new Give_Donate_Form($form_id);
156 156
 
157 157
 	return $form->is_custom_price_mode();
158 158
 }
159 159
\ No newline at end of file
Please login to merge, or discard this patch.
includes/forms/template.php 4 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1020,9 +1020,12 @@
 block discarded – undo
1020 1020
 				    }
1021 1021
 				    ?>
1022 1022
 			    </select>
1023
-		    <?php else : ?>
1023
+		    <?php else {
1024
+	: ?>
1024 1025
 			    <input type="text" size="6" name="card_state" id="card_state" class="card_state give-input"
1025
-			           placeholder="<?php echo $label; ?>" value="<?php echo $selected_state; ?>"/>
1026
+			           placeholder="<?php echo $label;
1027
+}
1028
+?>" value="<?php echo $selected_state; ?>"/>
1026 1029
 		    <?php endif; ?>
1027 1030
 	    </p>
1028 1031
 
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @since 1.0
23 23
  *
24
- * @return string Donation form.
24
+ * @return false|null Donation form.
25 25
  */
26 26
 function give_get_donation_form( $args = array() ) {
27 27
 
@@ -1482,7 +1482,7 @@  discard block
 block discarded – undo
1482 1482
  *
1483 1483
  * @param  int $form_id The form ID.
1484 1484
  *
1485
- * @return bool
1485
+ * @return false|null
1486 1486
  */
1487 1487
 function give_terms_agreement( $form_id ) {
1488 1488
 	$form_option = give_get_meta( $form_id, '_give_terms_option', true );
@@ -1676,7 +1676,7 @@  discard block
 block discarded – undo
1676 1676
  * @param  int   $form_id The form ID.
1677 1677
  * @param  array $args    An array of form arguments.
1678 1678
  *
1679
- * @return mixed
1679
+ * @return boolean
1680 1680
  */
1681 1681
 function give_show_goal_progress( $form_id, $args = array() ) {
1682 1682
 
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
  * @param  int $total      Total amount based on shortcode parameter.
1704 1704
  * @param  int $total_goal Total Goal amount passed by Admin.
1705 1705
  *
1706
- * @return mixed
1706
+ * @return boolean
1707 1707
  */
1708 1708
 function give_show_goal_totals_progress( $total, $total_goal ) {
1709 1709
 
@@ -1727,7 +1727,7 @@  discard block
 block discarded – undo
1727 1727
  *
1728 1728
  * @since  1.8
1729 1729
  *
1730
- * @param  $form_id
1730
+ * @param  integer $form_id
1731 1731
  * @param  $args
1732 1732
  *
1733 1733
  * @return mixed|string
@@ -1768,7 +1768,7 @@  discard block
 block discarded – undo
1768 1768
  * @param  int   $form_id The form ID.
1769 1769
  * @param  array $args    An array of form arguments.
1770 1770
  *
1771
- * @return void|bool
1771
+ * @return false|null
1772 1772
  */
1773 1773
 function give_form_content( $form_id, $args ) {
1774 1774
 
@@ -2058,7 +2058,7 @@  discard block
 block discarded – undo
2058 2058
  *
2059 2059
  * @since 2.1
2060 2060
  *
2061
- * @return array
2061
+ * @return string[]
2062 2062
  */
2063 2063
 function add_class_for_form_grid( $class, $id, $args ) {
2064 2064
 	$class[] = 'give-form-grid-wrap';
@@ -2069,7 +2069,6 @@  discard block
 block discarded – undo
2069 2069
 /**
2070 2070
  * Add hidden field to Form Grid page
2071 2071
  *
2072
- * @param int              $form_id The form ID.
2073 2072
  * @param array            $args    An array of form arguments.
2074 2073
  * @param Give_Donate_Form $form    Form object.
2075 2074
  *
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -996,10 +996,10 @@  discard block
 block discarded – undo
996 996
 			    <?php echo( give_field_is_required( 'billing_country', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
997 997
 		    >
998 998
 			    <?php
999
-			    foreach ( $countries as $country_code => $country ) {
1000
-				    echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>';
1001
-			    }
1002
-			    ?>
999
+				foreach ( $countries as $country_code => $country ) {
1000
+					echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>';
1001
+				}
1002
+				?>
1003 1003
 		    </select>
1004 1004
 	    </p>
1005 1005
 
@@ -1071,7 +1071,7 @@  discard block
 block discarded – undo
1071 1071
 		    <label for="card_state" class="give-label">
1072 1072
 			    <span class="state-label-text"><?php echo $label; ?></span>
1073 1073
 			    <?php if ( give_field_is_required( 'card_state', $form_id ) ) :
1074
-				    ?>
1074
+					?>
1075 1075
 				    <span class="give-required-indicator <?php echo( array_key_exists( $selected_country, $states_not_required_country_list ) ? 'give-hidden' : '' ) ?> ">*</span>
1076 1076
 			    <?php endif; ?>
1077 1077
 			    <span class="give-tooltip give-icon give-icon-question"
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
 		    </label>
1080 1080
 		    <?php
1081 1081
 
1082
-		    if ( ! empty( $states ) ) : ?>
1082
+			if ( ! empty( $states ) ) : ?>
1083 1083
 			    <select
1084 1084
 					    name="card_state"
1085 1085
 					    autocomplete="address-level4"
@@ -1087,10 +1087,10 @@  discard block
 block discarded – undo
1087 1087
 					    class="card_state give-select<?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required' : '' ); ?>"
1088 1088
 				    <?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required aria-required="true" ' : '' ); ?>>
1089 1089
 				    <?php
1090
-				    foreach ( $states as $state_code => $state ) {
1091
-					    echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>';
1092
-				    }
1093
-				    ?>
1090
+					foreach ( $states as $state_code => $state ) {
1091
+						echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>';
1092
+					}
1093
+					?>
1094 1094
 			    </select>
1095 1095
 		    <?php else : ?>
1096 1096
 			    <input type="text" size="6" name="card_state" id="card_state" class="card_state give-input"
@@ -1292,8 +1292,8 @@  discard block
 block discarded – undo
1292 1292
 				<a href="<?php echo remove_query_arg( 'login' ); ?>" class="give-checkout-register-cancel"
1293 1293
 				   data-action="give_checkout_register">
1294 1294
 					<?php if ( give_logged_in_only( $form_id ) ) {
1295
-					    _e( 'Register as a part of your donation &raquo;', 'give' );
1296
-                    } else {
1295
+						_e( 'Register as a part of your donation &raquo;', 'give' );
1296
+					} else {
1297 1297
 						 _e( 'Register or donate as a guest &raquo;', 'give' );
1298 1298
 					} ?>
1299 1299
 				</a>
Please login to merge, or discard this patch.
Spacing   +461 added lines, -463 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -23,35 +23,35 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @return string Donation form.
25 25
  */
26
-function give_get_donation_form( $args = array() ) {
26
+function give_get_donation_form($args = array()) {
27 27
 
28 28
 	global $post;
29 29
 	static $count = 1;
30 30
 
31
-	$form_id = is_object( $post ) ? $post->ID : 0;
31
+	$form_id = is_object($post) ? $post->ID : 0;
32 32
 
33
-	if ( isset( $args['id'] ) ) {
33
+	if (isset($args['id'])) {
34 34
 		$form_id = $args['id'];
35 35
 	}
36 36
 
37
-	$defaults = apply_filters( 'give_form_args_defaults', array(
37
+	$defaults = apply_filters('give_form_args_defaults', array(
38 38
 		'form_id' => $form_id,
39
-	) );
39
+	));
40 40
 
41
-	$args = wp_parse_args( $args, $defaults );
41
+	$args = wp_parse_args($args, $defaults);
42 42
 
43
-	$form = new Give_Donate_Form( $args['form_id'] );
43
+	$form = new Give_Donate_Form($args['form_id']);
44 44
 
45 45
 	// Bail out, if no form ID.
46
-	if ( empty( $form->ID ) ) {
46
+	if (empty($form->ID)) {
47 47
 		return false;
48 48
 	}
49 49
 
50 50
 	$args['id_prefix'] = "{$form_id}-{$count}";
51
-	$payment_mode      = give_get_chosen_gateway( $form->ID );
51
+	$payment_mode      = give_get_chosen_gateway($form->ID);
52 52
 
53 53
 	$form_action = add_query_arg(
54
-		apply_filters( 'give_form_action_args', array(
54
+		apply_filters('give_form_action_args', array(
55 55
 				'payment-mode' => $payment_mode,
56 56
 			)
57 57
 		),
@@ -60,17 +60,17 @@  discard block
 block discarded – undo
60 60
 
61 61
 	// Sanity Check: Donation form not published or user doesn't have permission to view drafts.
62 62
 	if (
63
-		( 'publish' !== $form->post_status && ! current_user_can( 'edit_give_forms', $form->ID ) )
64
-		|| ( 'trash' === $form->post_status )
63
+		('publish' !== $form->post_status && ! current_user_can('edit_give_forms', $form->ID))
64
+		|| ('trash' === $form->post_status)
65 65
 	) {
66 66
 		return false;
67 67
 	}
68 68
 
69 69
 	// Get the form wrap CSS classes.
70
-	$form_wrap_classes = $form->get_form_wrap_classes( $args );
70
+	$form_wrap_classes = $form->get_form_wrap_classes($args);
71 71
 
72 72
 	// Get the <form> tag wrap CSS classes.
73
-	$form_classes = $form->get_form_classes( $args );
73
+	$form_classes = $form->get_form_classes($args);
74 74
 
75 75
 	ob_start();
76 76
 
@@ -82,21 +82,21 @@  discard block
 block discarded – undo
82 82
 	 * @param int   $form_id The form ID.
83 83
 	 * @param array $args    An array of form arguments.
84 84
 	 */
85
-	do_action( 'give_pre_form_output', $form->ID, $args, $form );
85
+	do_action('give_pre_form_output', $form->ID, $args, $form);
86 86
 
87 87
 	?>
88 88
 	<div id="give-form-<?php echo $form->ID; ?>-wrap" class="<?php echo $form_wrap_classes; ?>">
89 89
 		<?php
90
-		if ( $form->is_close_donation_form() ) {
90
+		if ($form->is_close_donation_form()) {
91 91
 
92
-			$form_title = ! is_singular( 'give_forms' ) ? apply_filters( 'give_form_title', '<h2 class="give-form-title">' . get_the_title( $form_id ) . '</h2>' ) : '';
92
+			$form_title = ! is_singular('give_forms') ? apply_filters('give_form_title', '<h2 class="give-form-title">'.get_the_title($form_id).'</h2>') : '';
93 93
 
94 94
 			// Get Goal thank you message.
95
-			$goal_achieved_message = get_post_meta( $form->ID, '_give_form_goal_achieved_message', true );
96
-			$goal_achieved_message = ! empty( $goal_achieved_message ) ? $form_title . apply_filters( 'the_content', $goal_achieved_message ) : '';
95
+			$goal_achieved_message = get_post_meta($form->ID, '_give_form_goal_achieved_message', true);
96
+			$goal_achieved_message = ! empty($goal_achieved_message) ? $form_title.apply_filters('the_content', $goal_achieved_message) : '';
97 97
 
98 98
 			// Print thank you message.
99
-			echo apply_filters( 'give_goal_closed_output', $goal_achieved_message, $form->ID, $form );
99
+			echo apply_filters('give_goal_closed_output', $goal_achieved_message, $form->ID, $form);
100 100
 
101 101
 		} else {
102 102
 			/**
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
 			 * 1. if show_title params set to true
105 105
 			 * 2. if admin set form display_style to button
106 106
 			 */
107
-			$form_title = apply_filters( 'give_form_title', '<h2 class="give-form-title">' . get_the_title( $form_id ) . '</h2>' );
107
+			$form_title = apply_filters('give_form_title', '<h2 class="give-form-title">'.get_the_title($form_id).'</h2>');
108 108
 			if (
109 109
 				(
110
-					( isset( $args['show_title'] ) && $args['show_title'] == true )
111
-					|| ( 'button' === get_post_meta( $form_id, '_give_payment_display', true ) )
110
+					(isset($args['show_title']) && $args['show_title'] == true)
111
+					|| ('button' === get_post_meta($form_id, '_give_payment_display', true))
112 112
 				)
113
-				&& ! doing_action( 'give_single_form_summary' )
113
+				&& ! doing_action('give_single_form_summary')
114 114
 			) {
115 115
 				echo $form_title;
116 116
 			}
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
 			 * @param array            $args    An array of form arguments.
125 125
 			 * @param Give_Donate_Form $form    Form object.
126 126
 			 */
127
-			do_action( 'give_pre_form', $form->ID, $args, $form );
127
+			do_action('give_pre_form', $form->ID, $args, $form);
128 128
 
129 129
 			// Set form html tags.
130 130
 			$form_html_tags = array(
131 131
 				'id'      => "give-form-{$args['id_prefix']}",
132 132
 				'class'   => $form_classes,
133
-				'action'  => esc_url_raw( $form_action ),
133
+				'action'  => esc_url_raw($form_action),
134 134
 				'data-id' => $args['id_prefix'],
135 135
 			);
136 136
 
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
 			 * @param array            $form_html_tags Array of form html tags.
143 143
 			 * @param Give_Donate_Form $form           Form object.
144 144
 			 */
145
-			$form_html_tags = apply_filters( 'give_form_html_tags', (array) $form_html_tags, $form );
145
+			$form_html_tags = apply_filters('give_form_html_tags', (array) $form_html_tags, $form);
146 146
 			?>
147
-			<form <?php echo give_get_attribute_str( $form_html_tags ); ?> method="post">
147
+			<form <?php echo give_get_attribute_str($form_html_tags); ?> method="post">
148 148
 				<!-- The following field is for robots only, invisible to humans: -->
149 149
 				<span class="give-hidden" style="display: none !important;">
150 150
 					<label for="give-form-honeypot-<?php echo $form_id; ?>"></label>
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 				 * @param array            $args    An array of form arguments.
163 163
 				 * @param Give_Donate_Form $form    Form object.
164 164
 				 */
165
-				do_action( 'give_donation_form_top', $form->ID, $args, $form );
165
+				do_action('give_donation_form_top', $form->ID, $args, $form);
166 166
 
167 167
 				/**
168 168
 				 * Fires while outputting donation form, for payment gateway fields.
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 				 * @param array            $args    An array of form arguments.
174 174
 				 * @param Give_Donate_Form $form    Form object.
175 175
 				 */
176
-				do_action( 'give_payment_mode_select', $form->ID, $args, $form );
176
+				do_action('give_payment_mode_select', $form->ID, $args, $form);
177 177
 
178 178
 				/**
179 179
 				 * Fires while outputting donation form, after all other fields.
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 				 * @param array            $args    An array of form arguments.
185 185
 				 * @param Give_Donate_Form $form    Form object.
186 186
 				 */
187
-				do_action( 'give_donation_form_bottom', $form->ID, $args, $form );
187
+				do_action('give_donation_form_bottom', $form->ID, $args, $form);
188 188
 
189 189
 				?>
190 190
 			</form>
@@ -199,12 +199,12 @@  discard block
 block discarded – undo
199 199
 			 * @param array            $args    An array of form arguments.
200 200
 			 * @param Give_Donate_Form $form    Form object.
201 201
 			 */
202
-			do_action( 'give_post_form', $form->ID, $args, $form );
202
+			do_action('give_post_form', $form->ID, $args, $form);
203 203
 
204 204
 		}
205 205
 		?>
206 206
 
207
-	</div><!--end #give-form-<?php echo absint( $form->ID ); ?>-->
207
+	</div><!--end #give-form-<?php echo absint($form->ID); ?>-->
208 208
 	<?php
209 209
 
210 210
 	/**
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
 	 * @param int   $form_id The form ID.
216 216
 	 * @param array $args    An array of form arguments.
217 217
 	 */
218
-	do_action( 'give_post_form_output', $form->ID, $args );
218
+	do_action('give_post_form_output', $form->ID, $args);
219 219
 
220 220
 	$final_output = ob_get_clean();
221
-	$count ++;
221
+	$count++;
222 222
 
223
-	echo apply_filters( 'give_donate_form', $final_output, $args );
223
+	echo apply_filters('give_donate_form', $final_output, $args);
224 224
 }
225 225
 
226 226
 /**
@@ -237,11 +237,11 @@  discard block
 block discarded – undo
237 237
  *
238 238
  * @return string
239 239
  */
240
-function give_show_purchase_form( $form_id, $args ) {
240
+function give_show_purchase_form($form_id, $args) {
241 241
 
242
-	$payment_mode = give_get_chosen_gateway( $form_id );
242
+	$payment_mode = give_get_chosen_gateway($form_id);
243 243
 
244
-	if ( ! isset( $form_id ) && isset( $_POST['give_form_id'] ) ) {
244
+	if ( ! isset($form_id) && isset($_POST['give_form_id'])) {
245 245
 		$form_id = $_POST['give_form_id'];
246 246
 	}
247 247
 
@@ -250,33 +250,33 @@  discard block
 block discarded – undo
250 250
 	 *
251 251
 	 * @since 1.7
252 252
 	 */
253
-	do_action( 'give_payment_fields_top', $form_id );
253
+	do_action('give_payment_fields_top', $form_id);
254 254
 
255
-	if ( give_can_checkout() && isset( $form_id ) ) {
255
+	if (give_can_checkout() && isset($form_id)) {
256 256
 
257 257
 		/**
258 258
 		 * Fires while displaying donation form, before registration login.
259 259
 		 *
260 260
 		 * @since 1.7
261 261
 		 */
262
-		do_action( 'give_donation_form_before_register_login', $form_id, $args );
262
+		do_action('give_donation_form_before_register_login', $form_id, $args);
263 263
 
264 264
 		/**
265 265
 		 * Fire when register/login form fields render.
266 266
 		 *
267 267
 		 * @since 1.7
268 268
 		 */
269
-		do_action( 'give_donation_form_register_login_fields', $form_id, $args );
269
+		do_action('give_donation_form_register_login_fields', $form_id, $args);
270 270
 
271 271
 		/**
272 272
 		 * Fire when credit card form fields render.
273 273
 		 *
274 274
 		 * @since 1.7
275 275
 		 */
276
-		do_action( 'give_donation_form_before_cc_form', $form_id, $args );
276
+		do_action('give_donation_form_before_cc_form', $form_id, $args);
277 277
 
278 278
 		// Load the credit card form and allow gateways to load their own if they wish.
279
-		if ( has_action( 'give_' . $payment_mode . '_cc_form' ) ) {
279
+		if (has_action('give_'.$payment_mode.'_cc_form')) {
280 280
 			/**
281 281
 			 * Fires while displaying donation form, credit card form fields for a given gateway.
282 282
 			 *
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 			 *
285 285
 			 * @param int $form_id The form ID.
286 286
 			 */
287
-			do_action( "give_{$payment_mode}_cc_form", $form_id, $args );
287
+			do_action("give_{$payment_mode}_cc_form", $form_id, $args);
288 288
 		} else {
289 289
 			/**
290 290
 			 * Fires while displaying donation form, credit card form fields.
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 			 *
294 294
 			 * @param int $form_id The form ID.
295 295
 			 */
296
-			do_action( 'give_cc_form', $form_id, $args );
296
+			do_action('give_cc_form', $form_id, $args);
297 297
 		}
298 298
 
299 299
 		/**
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 		 *
302 302
 		 * @since 1.7
303 303
 		 */
304
-		do_action( 'give_donation_form_after_cc_form', $form_id, $args );
304
+		do_action('give_donation_form_after_cc_form', $form_id, $args);
305 305
 
306 306
 	} else {
307 307
 		/**
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 		 *
310 310
 		 * @since 1.7
311 311
 		 */
312
-		do_action( 'give_donation_form_no_access', $form_id );
312
+		do_action('give_donation_form_no_access', $form_id);
313 313
 
314 314
 	}
315 315
 
@@ -318,10 +318,10 @@  discard block
 block discarded – undo
318 318
 	 *
319 319
 	 * @since 1.7
320 320
 	 */
321
-	do_action( 'give_payment_fields_bottom', $form_id, $args );
321
+	do_action('give_payment_fields_bottom', $form_id, $args);
322 322
 }
323 323
 
324
-add_action( 'give_donation_form', 'give_show_purchase_form', 10, 2 );
324
+add_action('give_donation_form', 'give_show_purchase_form', 10, 2);
325 325
 
326 326
 /**
327 327
  * Give Show Login/Register Form Fields.
@@ -332,11 +332,11 @@  discard block
 block discarded – undo
332 332
  *
333 333
  * @return void
334 334
  */
335
-function give_show_register_login_fields( $form_id ) {
335
+function give_show_register_login_fields($form_id) {
336 336
 
337
-	$show_register_form = give_show_login_register_option( $form_id );
337
+	$show_register_form = give_show_login_register_option($form_id);
338 338
 
339
-	if ( ( $show_register_form === 'registration' || ( $show_register_form === 'both' && ! isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) :
339
+	if (($show_register_form === 'registration' || ($show_register_form === 'both' && ! isset($_GET['login']))) && ! is_user_logged_in()) :
340 340
 		?>
341 341
 		<div id="give-checkout-login-register-<?php echo $form_id; ?>">
342 342
 			<?php
@@ -345,11 +345,11 @@  discard block
 block discarded – undo
345 345
 			 *
346 346
 			 * @since 1.7
347 347
 			 */
348
-			do_action( 'give_donation_form_register_fields', $form_id );
348
+			do_action('give_donation_form_register_fields', $form_id);
349 349
 			?>
350 350
 		</div>
351 351
 		<?php
352
-	elseif ( ( $show_register_form === 'login' || ( $show_register_form === 'both' && isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) :
352
+	elseif (($show_register_form === 'login' || ($show_register_form === 'both' && isset($_GET['login']))) && ! is_user_logged_in()) :
353 353
 		?>
354 354
 		<div id="give-checkout-login-register-<?php echo $form_id; ?>">
355 355
 			<?php
@@ -358,23 +358,23 @@  discard block
 block discarded – undo
358 358
 			 *
359 359
 			 * @since 1.7
360 360
 			 */
361
-			do_action( 'give_donation_form_login_fields', $form_id );
361
+			do_action('give_donation_form_login_fields', $form_id);
362 362
 			?>
363 363
 		</div>
364 364
 		<?php
365 365
 	endif;
366 366
 
367
-	if ( ( ! isset( $_GET['login'] ) && is_user_logged_in() ) || ! isset( $show_register_form ) || 'none' === $show_register_form || 'login' === $show_register_form ) {
367
+	if (( ! isset($_GET['login']) && is_user_logged_in()) || ! isset($show_register_form) || 'none' === $show_register_form || 'login' === $show_register_form) {
368 368
 		/**
369 369
 		 * Fire when user info render.
370 370
 		 *
371 371
 		 * @since 1.7
372 372
 		 */
373
-		do_action( 'give_donation_form_after_user_info', $form_id );
373
+		do_action('give_donation_form_after_user_info', $form_id);
374 374
 	}
375 375
 }
376 376
 
377
-add_action( 'give_donation_form_register_login_fields', 'give_show_register_login_fields' );
377
+add_action('give_donation_form_register_login_fields', 'give_show_register_login_fields');
378 378
 
379 379
 /**
380 380
  * Donation Amount Field.
@@ -389,16 +389,16 @@  discard block
 block discarded – undo
389 389
  *
390 390
  * @return void
391 391
  */
392
-function give_output_donation_amount_top( $form_id = 0, $args = array() ) {
392
+function give_output_donation_amount_top($form_id = 0, $args = array()) {
393 393
 
394 394
 	$give_options        = give_get_settings();
395
-	$variable_pricing    = give_has_variable_prices( $form_id );
396
-	$allow_custom_amount = give_get_meta( $form_id, '_give_custom_amount', true );
397
-	$currency_position   = isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before';
398
-	$symbol              = give_currency_symbol( give_get_currency( $form_id, $args ) );
399
-	$currency_output     = '<span class="give-currency-symbol give-currency-position-' . $currency_position . '">' . $symbol . '</span>';
400
-	$default_amount      = give_format_amount( give_get_default_form_amount( $form_id ), array( 'sanitize' => false, 'currency' => give_get_currency( $form_id ) ) );
401
-	$custom_amount_text  = give_get_meta( $form_id, '_give_custom_amount_text', true );
395
+	$variable_pricing    = give_has_variable_prices($form_id);
396
+	$allow_custom_amount = give_get_meta($form_id, '_give_custom_amount', true);
397
+	$currency_position   = isset($give_options['currency_position']) ? $give_options['currency_position'] : 'before';
398
+	$symbol              = give_currency_symbol(give_get_currency($form_id, $args));
399
+	$currency_output     = '<span class="give-currency-symbol give-currency-position-'.$currency_position.'">'.$symbol.'</span>';
400
+	$default_amount      = give_format_amount(give_get_default_form_amount($form_id), array('sanitize' => false, 'currency' => give_get_currency($form_id)));
401
+	$custom_amount_text  = give_get_meta($form_id, '_give_custom_amount_text', true);
402 402
 
403 403
 	/**
404 404
 	 * Fires while displaying donation form, before donation level fields.
@@ -408,20 +408,20 @@  discard block
 block discarded – undo
408 408
 	 * @param int   $form_id The form ID.
409 409
 	 * @param array $args    An array of form arguments.
410 410
 	 */
411
-	do_action( 'give_before_donation_levels', $form_id, $args );
411
+	do_action('give_before_donation_levels', $form_id, $args);
412 412
 
413 413
 	//Set Price, No Custom Amount Allowed means hidden price field
414
-	if ( ! give_is_setting_enabled( $allow_custom_amount ) ) {
414
+	if ( ! give_is_setting_enabled($allow_custom_amount)) {
415 415
 		?>
416
-		<label class="give-hidden" for="give-amount-hidden"><?php esc_html_e( 'Donation Amount:', 'give' ); ?></label>
416
+		<label class="give-hidden" for="give-amount-hidden"><?php esc_html_e('Donation Amount:', 'give'); ?></label>
417 417
 		<input id="give-amount" class="give-amount-hidden" type="hidden" name="give-amount"
418 418
 			   value="<?php echo $default_amount; ?>" required aria-required="true"/>
419 419
 		<div class="set-price give-donation-amount form-row-wide">
420
-			<?php if ( $currency_position == 'before' ) {
420
+			<?php if ($currency_position == 'before') {
421 421
 				echo $currency_output;
422 422
 			} ?>
423 423
 			<span id="give-amount-text" class="give-text-input give-amount-top"><?php echo $default_amount; ?></span>
424
-			<?php if ( $currency_position == 'after' ) {
424
+			<?php if ($currency_position == 'after') {
425 425
 				echo $currency_output;
426 426
 			} ?>
427 427
 		</div>
@@ -431,13 +431,13 @@  discard block
 block discarded – undo
431 431
 		?>
432 432
 		<div class="give-total-wrap">
433 433
 			<div class="give-donation-amount form-row-wide">
434
-				<?php if ( $currency_position == 'before' ) {
434
+				<?php if ($currency_position == 'before') {
435 435
 					echo $currency_output;
436 436
 				} ?>
437
-				<label class="give-hidden" for="give-amount"><?php esc_html_e( 'Donation Amount:', 'give' ); ?></label>
437
+				<label class="give-hidden" for="give-amount"><?php esc_html_e('Donation Amount:', 'give'); ?></label>
438 438
 				<input class="give-text-input give-amount-top" id="give-amount" name="give-amount" type="tel"
439 439
 					   placeholder="" value="<?php echo $default_amount; ?>" autocomplete="off">
440
-				<?php if ( $currency_position == 'after' ) {
440
+				<?php if ($currency_position == 'after') {
441 441
 					echo $currency_output;
442 442
 				} ?>
443 443
 			</div>
@@ -452,16 +452,16 @@  discard block
 block discarded – undo
452 452
 	 * @param int   $form_id The form ID.
453 453
 	 * @param array $args    An array of form arguments.
454 454
 	 */
455
-	do_action( 'give_after_donation_amount', $form_id, $args );
455
+	do_action('give_after_donation_amount', $form_id, $args);
456 456
 
457 457
 	//Custom Amount Text
458
-	if ( ! $variable_pricing && give_is_setting_enabled( $allow_custom_amount ) && ! empty( $custom_amount_text ) ) { ?>
458
+	if ( ! $variable_pricing && give_is_setting_enabled($allow_custom_amount) && ! empty($custom_amount_text)) { ?>
459 459
 		<p class="give-custom-amount-text"><?php echo $custom_amount_text; ?></p>
460 460
 	<?php }
461 461
 
462 462
 	//Output Variable Pricing Levels.
463
-	if ( $variable_pricing ) {
464
-		give_output_levels( $form_id );
463
+	if ($variable_pricing) {
464
+		give_output_levels($form_id);
465 465
 	}
466 466
 
467 467
 	/**
@@ -472,10 +472,10 @@  discard block
 block discarded – undo
472 472
 	 * @param int   $form_id The form ID.
473 473
 	 * @param array $args    An array of form arguments.
474 474
 	 */
475
-	do_action( 'give_after_donation_levels', $form_id, $args );
475
+	do_action('give_after_donation_levels', $form_id, $args);
476 476
 }
477 477
 
478
-add_action( 'give_donation_form_top', 'give_output_donation_amount_top', 10, 2 );
478
+add_action('give_donation_form_top', 'give_output_donation_amount_top', 10, 2);
479 479
 
480 480
 /**
481 481
  * Outputs the Donation Levels in various formats such as dropdown, radios, and buttons.
@@ -486,48 +486,48 @@  discard block
 block discarded – undo
486 486
  *
487 487
  * @return string Donation levels.
488 488
  */
489
-function give_output_levels( $form_id ) {
489
+function give_output_levels($form_id) {
490 490
 
491 491
 	//Get variable pricing.
492
-	$prices             = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id );
493
-	$display_style      = give_get_meta( $form_id, '_give_display_style', true );
494
-	$custom_amount      = give_get_meta( $form_id, '_give_custom_amount', true );
495
-	$custom_amount_text = give_get_meta( $form_id, '_give_custom_amount_text', true );
492
+	$prices             = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id);
493
+	$display_style      = give_get_meta($form_id, '_give_display_style', true);
494
+	$custom_amount      = give_get_meta($form_id, '_give_custom_amount', true);
495
+	$custom_amount_text = give_get_meta($form_id, '_give_custom_amount_text', true);
496 496
 
497
-	if ( empty( $custom_amount_text ) ) {
498
-		$custom_amount_text = esc_html__( 'Give a Custom Amount', 'give' );
497
+	if (empty($custom_amount_text)) {
498
+		$custom_amount_text = esc_html__('Give a Custom Amount', 'give');
499 499
 	}
500 500
 
501 501
 	$output = '';
502 502
 
503
-	switch ( $display_style ) {
503
+	switch ($display_style) {
504 504
 		case 'buttons':
505 505
 
506 506
 			$output .= '<ul id="give-donation-level-button-wrap" class="give-donation-levels-wrap give-list-inline">';
507 507
 
508
-			foreach ( $prices as $price ) {
509
-				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ), $form_id, $price );
510
-				$level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-' . $price['_give_id']['level_id'] . ' ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'give-default-level' : '' ), $form_id, $price );
508
+			foreach ($prices as $price) {
509
+				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))), $form_id, $price);
510
+				$level_classes = apply_filters('give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-'.$price['_give_id']['level_id'].' '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'give-default-level' : ''), $form_id, $price);
511 511
 
512
-				$formatted_amount = give_format_amount( $price['_give_amount'], array(
512
+				$formatted_amount = give_format_amount($price['_give_amount'], array(
513 513
 					'sanitize' => false,
514
-					'currency' => give_get_currency( $form_id ),
515
-				) );
514
+					'currency' => give_get_currency($form_id),
515
+				));
516 516
 
517 517
 				$output .= sprintf(
518 518
 					'<li><button type="button" data-price-id="%1$s" class="%2$s" value="%3$s" data-default="%4$s">%5$s</button></li>',
519 519
 					$price['_give_id']['level_id'],
520 520
 					$level_classes,
521 521
 					$formatted_amount,
522
-					array_key_exists( '_give_default', $price ) ? 1 : 0,
522
+					array_key_exists('_give_default', $price) ? 1 : 0,
523 523
 					$level_text
524 524
 				);
525 525
 			}
526 526
 
527 527
 			//Custom Amount.
528 528
 			if (
529
-				give_is_setting_enabled( $custom_amount )
530
-				&& ! empty( $custom_amount_text )
529
+				give_is_setting_enabled($custom_amount)
530
+				&& ! empty($custom_amount_text)
531 531
 			) {
532 532
 
533 533
 				$output .= sprintf(
@@ -544,30 +544,30 @@  discard block
 block discarded – undo
544 544
 
545 545
 			$output .= '<ul id="give-donation-level-radio-list" class="give-donation-levels-wrap">';
546 546
 
547
-			foreach ( $prices as $price ) {
548
-				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ), $form_id, $price );
549
-				$level_classes = apply_filters( 'give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-' . $price['_give_id']['level_id'] . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? ' give-default-level' : '' ), $form_id, $price );
547
+			foreach ($prices as $price) {
548
+				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))), $form_id, $price);
549
+				$level_classes = apply_filters('give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-'.$price['_give_id']['level_id'].((isset($price['_give_default']) && $price['_give_default'] === 'default') ? ' give-default-level' : ''), $form_id, $price);
550 550
 
551
-				$formatted_amount = give_format_amount( $price['_give_amount'], array(
551
+				$formatted_amount = give_format_amount($price['_give_amount'], array(
552 552
 					'sanitize' => false,
553
-					'currency' => give_get_currency( $form_id ),
554
-				) );
553
+					'currency' => give_get_currency($form_id),
554
+				));
555 555
 
556 556
 				$output .= sprintf(
557 557
 					'<li><input type="radio" data-price-id="%1$s" class="%2$s" value="%3$s" name="give-radio-donation-level" id="give-radio-level-%1$s" %4$s data-default="%5$s"><label for="give-radio-level-%1$s">%6$s</label></li>',
558 558
 					$price['_give_id']['level_id'],
559 559
 					$level_classes,
560 560
 					$formatted_amount,
561
-					( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'checked="checked"' : '' ),
562
-					array_key_exists( '_give_default', $price ) ? 1 : 0,
561
+					((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'checked="checked"' : ''),
562
+					array_key_exists('_give_default', $price) ? 1 : 0,
563 563
 					$level_text
564 564
 				);
565 565
 			}
566 566
 
567 567
 			//Custom Amount.
568 568
 			if (
569
-				give_is_setting_enabled( $custom_amount )
570
-				&& ! empty( $custom_amount_text )
569
+				give_is_setting_enabled($custom_amount)
570
+				&& ! empty($custom_amount_text)
571 571
 			) {
572 572
 				$output .= sprintf(
573 573
 					'<li><input type="radio" data-price-id="custom" class="give-radio-input give-radio-input-level give-radio-level-custom" name="give-radio-donation-level" id="give-radio-level-custom" value="custom"><label for="give-radio-level-custom">%1$s</label></li>',
@@ -581,32 +581,32 @@  discard block
 block discarded – undo
581 581
 
582 582
 		case 'dropdown':
583 583
 
584
-			$output .= '<label for="give-donation-level-select-' . $form_id . '" class="give-hidden">' . esc_html__( 'Choose Your Donation Amount', 'give' ) . ':</label>';
585
-			$output .= '<select id="give-donation-level-select-' . $form_id . '" class="give-select give-select-level give-donation-levels-wrap">';
584
+			$output .= '<label for="give-donation-level-select-'.$form_id.'" class="give-hidden">'.esc_html__('Choose Your Donation Amount', 'give').':</label>';
585
+			$output .= '<select id="give-donation-level-select-'.$form_id.'" class="give-select give-select-level give-donation-levels-wrap">';
586 586
 
587 587
 			//first loop through prices.
588
-			foreach ( $prices as $price ) {
589
-				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ), $form_id, $price );
590
-				$level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-' . $price['_give_id']['level_id'] . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? ' give-default-level' : '' ), $form_id, $price );
588
+			foreach ($prices as $price) {
589
+				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))), $form_id, $price);
590
+				$level_classes = apply_filters('give_form_level_classes', 'give-donation-level-'.$price['_give_id']['level_id'].((isset($price['_give_default']) && $price['_give_default'] === 'default') ? ' give-default-level' : ''), $form_id, $price);
591 591
 
592
-				$formatted_amount = give_format_amount( $price['_give_amount'], array(
592
+				$formatted_amount = give_format_amount($price['_give_amount'], array(
593 593
 					'sanitize' => false,
594
-					'currency' => give_get_currency( $form_id ),
595
-				) );
594
+					'currency' => give_get_currency($form_id),
595
+				));
596 596
 
597 597
 				$output .= sprintf(
598 598
 					'<option data-price-id="%1$s" class="%2$s" value="%3$s" %4$s data-default="%5$s">%6$s</option>',
599 599
 					$price['_give_id']['level_id'],
600 600
 					$level_classes,
601 601
 					$formatted_amount,
602
-					( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'selected="selected"' : '' ),
603
-					array_key_exists( '_give_default', $price ) ? 1 : 0,
602
+					((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'selected="selected"' : ''),
603
+					array_key_exists('_give_default', $price) ? 1 : 0,
604 604
 					$level_text
605 605
 				);
606 606
 			}
607 607
 
608 608
 			//Custom Amount.
609
-			if ( give_is_setting_enabled( $custom_amount ) && ! empty( $custom_amount_text ) ) {
609
+			if (give_is_setting_enabled($custom_amount) && ! empty($custom_amount_text)) {
610 610
 				$output .= sprintf(
611 611
 					'<option data-price-id="custom" class="give-donation-level-custom" value="custom">%1$s</option>',
612 612
 					$custom_amount_text
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 			break;
619 619
 	}
620 620
 
621
-	echo apply_filters( 'give_form_level_output', $output, $form_id );
621
+	echo apply_filters('give_form_level_output', $output, $form_id);
622 622
 }
623 623
 
624 624
 /**
@@ -633,27 +633,27 @@  discard block
 block discarded – undo
633 633
  *
634 634
  * @return string Checkout button.
635 635
  */
636
-function give_display_checkout_button( $form_id, $args ) {
636
+function give_display_checkout_button($form_id, $args) {
637 637
 
638
-	$display_option = ( isset( $args['display_style'] ) && ! empty( $args['display_style'] ) )
638
+	$display_option = (isset($args['display_style']) && ! empty($args['display_style']))
639 639
 		? $args['display_style']
640
-		: give_get_meta( $form_id, '_give_payment_display', true );
640
+		: give_get_meta($form_id, '_give_payment_display', true);
641 641
 
642
-	if ( 'button' === $display_option ) {
642
+	if ('button' === $display_option) {
643 643
 		$display_option = 'modal';
644
-	} elseif ( $display_option === 'onpage' ) {
644
+	} elseif ($display_option === 'onpage') {
645 645
 		return '';
646 646
 	}
647 647
 
648
-	$display_label_field = give_get_meta( $form_id, '_give_reveal_label', true );
649
-	$display_label       = ! empty( $args['continue_button_title'] ) ? $args['continue_button_title'] : ( ! empty( $display_label_field ) ? $display_label_field : esc_html__( 'Donate Now', 'give' ) );
648
+	$display_label_field = give_get_meta($form_id, '_give_reveal_label', true);
649
+	$display_label       = ! empty($args['continue_button_title']) ? $args['continue_button_title'] : ( ! empty($display_label_field) ? $display_label_field : esc_html__('Donate Now', 'give'));
650 650
 
651
-	$output = '<button type="button" class="give-btn give-btn-' . $display_option . '">' . $display_label . '</button>';
651
+	$output = '<button type="button" class="give-btn give-btn-'.$display_option.'">'.$display_label.'</button>';
652 652
 
653
-	echo apply_filters( 'give_display_checkout_button', $output );
653
+	echo apply_filters('give_display_checkout_button', $output);
654 654
 }
655 655
 
656
-add_action( 'give_after_donation_levels', 'give_display_checkout_button', 10, 2 );
656
+add_action('give_after_donation_levels', 'give_display_checkout_button', 10, 2);
657 657
 
658 658
 /**
659 659
  * Shows the User Info fields in the Personal Info box, more fields can be added via the hooks provided.
@@ -666,79 +666,79 @@  discard block
 block discarded – undo
666 666
  *
667 667
  * @return void
668 668
  */
669
-function give_user_info_fields( $form_id ) {
669
+function give_user_info_fields($form_id) {
670 670
 	// Get user info.
671
-	$give_user_info = _give_get_prefill_form_field_values( $form_id );
671
+	$give_user_info = _give_get_prefill_form_field_values($form_id);
672 672
 
673 673
 	/**
674 674
 	 * Fire before user personal information fields
675 675
 	 *
676 676
 	 * @since 1.7
677 677
 	 */
678
-	do_action( 'give_donation_form_before_personal_info', $form_id );
678
+	do_action('give_donation_form_before_personal_info', $form_id);
679 679
 	?>
680 680
 	<fieldset id="give_checkout_user_info">
681
-		<legend><?php echo apply_filters( 'give_checkout_personal_info_text', __( 'Personal Info', 'give' ) ); ?></legend>
681
+		<legend><?php echo apply_filters('give_checkout_personal_info_text', __('Personal Info', 'give')); ?></legend>
682 682
 		<p id="give-first-name-wrap" class="form-row form-row-first form-row-responsive">
683 683
 			<label class="give-label" for="give-first">
684
-				<?php _e( 'First Name', 'give' ); ?>
685
-				<?php if ( give_field_is_required( 'give_first', $form_id ) ) : ?>
684
+				<?php _e('First Name', 'give'); ?>
685
+				<?php if (give_field_is_required('give_first', $form_id)) : ?>
686 686
 					<span class="give-required-indicator">*</span>
687 687
 				<?php endif ?>
688
-				<?php echo Give()->tooltips->render_help( __( 'We will use this to personalize your account experience.', 'give' ) ); ?>
688
+				<?php echo Give()->tooltips->render_help(__('We will use this to personalize your account experience.', 'give')); ?>
689 689
 			</label>
690 690
 			<input
691 691
 					class="give-input required"
692 692
 					type="text"
693 693
 					name="give_first"
694 694
 					autocomplete="given-name"
695
-					placeholder="<?php _e( 'First Name', 'give' ); ?>"
695
+					placeholder="<?php _e('First Name', 'give'); ?>"
696 696
 					id="give-first"
697
-					value="<?php echo isset( $give_user_info['give_first'] ) ? $give_user_info['give_first'] : ''; ?>"
698
-				<?php echo( give_field_is_required( 'give_first', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
697
+					value="<?php echo isset($give_user_info['give_first']) ? $give_user_info['give_first'] : ''; ?>"
698
+				<?php echo(give_field_is_required('give_first', $form_id) ? ' required aria-required="true" ' : ''); ?>
699 699
 			/>
700 700
 		</p>
701 701
 
702 702
 		<p id="give-last-name-wrap" class="form-row form-row-last form-row-responsive">
703 703
 			<label class="give-label" for="give-last">
704
-				<?php _e( 'Last Name', 'give' ); ?>
705
-				<?php if ( give_field_is_required( 'give_last', $form_id ) ) : ?>
704
+				<?php _e('Last Name', 'give'); ?>
705
+				<?php if (give_field_is_required('give_last', $form_id)) : ?>
706 706
 					<span class="give-required-indicator">*</span>
707 707
 				<?php endif ?>
708
-				<?php echo Give()->tooltips->render_help( __( 'We will use this as well to personalize your account experience.', 'give' ) ); ?>
708
+				<?php echo Give()->tooltips->render_help(__('We will use this as well to personalize your account experience.', 'give')); ?>
709 709
 			</label>
710 710
 
711 711
 			<input
712
-					class="give-input<?php echo( give_field_is_required( 'give_last', $form_id ) ? ' required' : '' ); ?>"
712
+					class="give-input<?php echo(give_field_is_required('give_last', $form_id) ? ' required' : ''); ?>"
713 713
 					type="text"
714 714
 					name="give_last"
715 715
 					autocomplete="family-name"
716 716
 					id="give-last"
717
-					placeholder="<?php _e( 'Last Name', 'give' ); ?>"
718
-					value="<?php echo isset( $give_user_info['give_last'] ) ? $give_user_info['give_last'] : ''; ?>"
719
-				<?php echo( give_field_is_required( 'give_last', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
717
+					placeholder="<?php _e('Last Name', 'give'); ?>"
718
+					value="<?php echo isset($give_user_info['give_last']) ? $give_user_info['give_last'] : ''; ?>"
719
+				<?php echo(give_field_is_required('give_last', $form_id) ? ' required aria-required="true" ' : ''); ?>
720 720
 			/>
721 721
 		</p>
722 722
 
723
-		<?php if ( give_is_company_field_enabled( $form_id ) ) : ?>
724
-			<?php $give_company = give_field_is_required( 'give_company_name', $form_id ); ?>
723
+		<?php if (give_is_company_field_enabled($form_id)) : ?>
724
+			<?php $give_company = give_field_is_required('give_company_name', $form_id); ?>
725 725
 			<p id="give-company-wrap" class="form-row form-row-wide">
726 726
 				<label class="give-label" for="give-company">
727
-					<?php _e( 'Company Name', 'give' ); ?>
728
-					<?php if ( $give_company ) : ?>
727
+					<?php _e('Company Name', 'give'); ?>
728
+					<?php if ($give_company) : ?>
729 729
 						<span class="give-required-indicator">*</span>
730 730
 					<?php endif; ?>
731
-					<?php echo Give()->tooltips->render_help( __( 'Donate on behalf of Company', 'give' ) ); ?>
731
+					<?php echo Give()->tooltips->render_help(__('Donate on behalf of Company', 'give')); ?>
732 732
 				</label>
733 733
 
734 734
 				<input
735
-					class="give-input<?php echo( $give_company ? ' required' : '' ); ?>"
735
+					class="give-input<?php echo($give_company ? ' required' : ''); ?>"
736 736
 					type="text"
737 737
 					name="give_company_name"
738
-					placeholder="<?php _e( 'Company Name', 'give' ); ?>"
738
+					placeholder="<?php _e('Company Name', 'give'); ?>"
739 739
 					id="give-company"
740
-					value="<?php echo isset( $give_user_info['company_name'] ) ? $give_user_info['company_name'] : ''; ?>"
741
-					<?php echo( $give_company ? ' required aria-required="true" ' : '' ); ?>
740
+					value="<?php echo isset($give_user_info['company_name']) ? $give_user_info['company_name'] : ''; ?>"
741
+					<?php echo($give_company ? ' required aria-required="true" ' : ''); ?>
742 742
 				/>
743 743
 
744 744
 			</p>
@@ -750,15 +750,15 @@  discard block
 block discarded – undo
750 750
 		 *
751 751
 		 * @since 1.7
752 752
 		 */
753
-		do_action( 'give_donation_form_before_email', $form_id );
753
+		do_action('give_donation_form_before_email', $form_id);
754 754
 		?>
755 755
 		<p id="give-email-wrap" class="form-row form-row-wide">
756 756
 			<label class="give-label" for="give-email">
757
-				<?php _e( 'Email Address', 'give' ); ?>
758
-				<?php if ( give_field_is_required( 'give_email', $form_id ) ) { ?>
757
+				<?php _e('Email Address', 'give'); ?>
758
+				<?php if (give_field_is_required('give_email', $form_id)) { ?>
759 759
 					<span class="give-required-indicator">*</span>
760 760
 				<?php } ?>
761
-				<?php echo Give()->tooltips->render_help( __( 'We will send the donation receipt to this address.', 'give' ) ); ?>
761
+				<?php echo Give()->tooltips->render_help(__('We will send the donation receipt to this address.', 'give')); ?>
762 762
 			</label>
763 763
 
764 764
 			<input
@@ -766,10 +766,10 @@  discard block
 block discarded – undo
766 766
 					type="email"
767 767
 					name="give_email"
768 768
 					autocomplete="email"
769
-					placeholder="<?php _e( 'Email Address', 'give' ); ?>"
769
+					placeholder="<?php _e('Email Address', 'give'); ?>"
770 770
 					id="give-email"
771
-					value="<?php echo isset( $give_user_info['give_email'] ) ? $give_user_info['give_email'] : ''; ?>"
772
-				<?php echo( give_field_is_required( 'give_email', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
771
+					value="<?php echo isset($give_user_info['give_email']) ? $give_user_info['give_email'] : ''; ?>"
772
+				<?php echo(give_field_is_required('give_email', $form_id) ? ' required aria-required="true" ' : ''); ?>
773 773
 			/>
774 774
 
775 775
 		</p>
@@ -779,14 +779,14 @@  discard block
 block discarded – undo
779 779
 		 *
780 780
 		 * @since 1.7
781 781
 		 */
782
-		do_action( 'give_donation_form_after_email', $form_id );
782
+		do_action('give_donation_form_after_email', $form_id);
783 783
 
784 784
 		/**
785 785
 		 * Fire after personal email field
786 786
 		 *
787 787
 		 * @since 1.7
788 788
 		 */
789
-		do_action( 'give_donation_form_user_info', $form_id );
789
+		do_action('give_donation_form_user_info', $form_id);
790 790
 		?>
791 791
 	</fieldset>
792 792
 	<?php
@@ -795,11 +795,11 @@  discard block
 block discarded – undo
795 795
 	 *
796 796
 	 * @since 1.7
797 797
 	 */
798
-	do_action( 'give_donation_form_after_personal_info', $form_id );
798
+	do_action('give_donation_form_after_personal_info', $form_id);
799 799
 }
800 800
 
801
-add_action( 'give_donation_form_after_user_info', 'give_user_info_fields' );
802
-add_action( 'give_register_fields_before', 'give_user_info_fields' );
801
+add_action('give_donation_form_after_user_info', 'give_user_info_fields');
802
+add_action('give_register_fields_before', 'give_user_info_fields');
803 803
 
804 804
 /**
805 805
  * Renders the credit card info form.
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
  *
811 811
  * @return void
812 812
  */
813
-function give_get_cc_form( $form_id ) {
813
+function give_get_cc_form($form_id) {
814 814
 
815 815
 	ob_start();
816 816
 
@@ -821,50 +821,50 @@  discard block
 block discarded – undo
821 821
 	 *
822 822
 	 * @param int $form_id The form ID.
823 823
 	 */
824
-	do_action( 'give_before_cc_fields', $form_id );
824
+	do_action('give_before_cc_fields', $form_id);
825 825
 	?>
826 826
 	<fieldset id="give_cc_fields-<?php echo $form_id ?>" class="give-do-validate">
827
-		<legend><?php echo apply_filters( 'give_credit_card_fieldset_heading', esc_html__( 'Credit Card Info', 'give' ) ); ?></legend>
828
-		<?php if ( is_ssl() ) : ?>
827
+		<legend><?php echo apply_filters('give_credit_card_fieldset_heading', esc_html__('Credit Card Info', 'give')); ?></legend>
828
+		<?php if (is_ssl()) : ?>
829 829
 			<div id="give_secure_site_wrapper-<?php echo $form_id ?>">
830 830
 				<span class="give-icon padlock"></span>
831
-				<span><?php _e( 'This is a secure SSL encrypted payment.', 'give' ); ?></span>
831
+				<span><?php _e('This is a secure SSL encrypted payment.', 'give'); ?></span>
832 832
 			</div>
833 833
 		<?php endif; ?>
834 834
 		<p id="give-card-number-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds form-row-responsive">
835 835
 			<label for="card_number-<?php echo $form_id ?>" class="give-label">
836
-				<?php _e( 'Card Number', 'give' ); ?>
836
+				<?php _e('Card Number', 'give'); ?>
837 837
 				<span class="give-required-indicator">*</span>
838
-				<?php echo Give()->tooltips->render_help( __( 'The (typically) 16 digits on the front of your credit card.', 'give' ) ); ?>
838
+				<?php echo Give()->tooltips->render_help(__('The (typically) 16 digits on the front of your credit card.', 'give')); ?>
839 839
 				<span class="card-type"></span>
840 840
 			</label>
841 841
 
842 842
 			<input type="tel" autocomplete="off" name="card_number" id="card_number-<?php echo $form_id ?>"
843
-				   class="card-number give-input required" placeholder="<?php _e( 'Card number', 'give' ); ?>"
843
+				   class="card-number give-input required" placeholder="<?php _e('Card number', 'give'); ?>"
844 844
 				   required aria-required="true"/>
845 845
 		</p>
846 846
 
847 847
 		<p id="give-card-cvc-wrap-<?php echo $form_id ?>" class="form-row form-row-one-third form-row-responsive">
848 848
 			<label for="card_cvc-<?php echo $form_id ?>" class="give-label">
849
-				<?php _e( 'CVC', 'give' ); ?>
849
+				<?php _e('CVC', 'give'); ?>
850 850
 				<span class="give-required-indicator">*</span>
851
-				<?php echo Give()->tooltips->render_help( __( 'The 3 digit (back) or 4 digit (front) value on your card.', 'give' ) ); ?>
851
+				<?php echo Give()->tooltips->render_help(__('The 3 digit (back) or 4 digit (front) value on your card.', 'give')); ?>
852 852
 			</label>
853 853
 
854 854
 			<input type="tel" size="4" autocomplete="off" name="card_cvc" id="card_cvc-<?php echo $form_id ?>"
855
-				   class="card-cvc give-input required" placeholder="<?php _e( 'Security code', 'give' ); ?>"
855
+				   class="card-cvc give-input required" placeholder="<?php _e('Security code', 'give'); ?>"
856 856
 				   required aria-required="true"/>
857 857
 		</p>
858 858
 
859 859
 		<p id="give-card-name-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds form-row-responsive">
860 860
 			<label for="card_name-<?php echo $form_id ?>" class="give-label">
861
-				<?php _e( 'Name on the Card', 'give' ); ?>
861
+				<?php _e('Name on the Card', 'give'); ?>
862 862
 				<span class="give-required-indicator">*</span>
863
-				<?php echo Give()->tooltips->render_help( __( 'The name printed on the front of your credit card.', 'give' ) ); ?>
863
+				<?php echo Give()->tooltips->render_help(__('The name printed on the front of your credit card.', 'give')); ?>
864 864
 			</label>
865 865
 
866 866
 			<input type="text" autocomplete="off" name="card_name" id="card_name-<?php echo $form_id ?>"
867
-				   class="card-name give-input required" placeholder="<?php esc_attr_e( 'Card name', 'give' ); ?>"
867
+				   class="card-name give-input required" placeholder="<?php esc_attr_e('Card name', 'give'); ?>"
868 868
 				   required aria-required="true"/>
869 869
 		</p>
870 870
 		<?php
@@ -875,19 +875,19 @@  discard block
 block discarded – undo
875 875
 		 *
876 876
 		 * @param int $form_id The form ID.
877 877
 		 */
878
-		do_action( 'give_before_cc_expiration' );
878
+		do_action('give_before_cc_expiration');
879 879
 		?>
880 880
 		<p class="card-expiration form-row form-row-one-third form-row-responsive">
881 881
 			<label for="card_expiry-<?php echo $form_id ?>" class="give-label">
882
-				<?php _e( 'Expiration', 'give' ); ?>
882
+				<?php _e('Expiration', 'give'); ?>
883 883
 				<span class="give-required-indicator">*</span>
884
-				<?php echo Give()->tooltips->render_help( __( 'The date your credit card expires, typically on the front of the card.', 'give' ) ); ?>
884
+				<?php echo Give()->tooltips->render_help(__('The date your credit card expires, typically on the front of the card.', 'give')); ?>
885 885
 			</label>
886 886
 
887 887
 			<input type="hidden" id="card_exp_month-<?php echo $form_id ?>" name="card_exp_month" class="card-expiry-month"/>
888 888
 			<input type="hidden" id="card_exp_year-<?php echo $form_id ?>" name="card_exp_year" class="card-expiry-year"/>
889 889
 
890
-			<input type="tel" autocomplete="off" name="card_expiry" id="card_expiry-<?php echo $form_id ?>" class="card-expiry give-input required" placeholder="<?php esc_attr_e( 'MM / YY', 'give' ); ?>" required aria-required="true"/>
890
+			<input type="tel" autocomplete="off" name="card_expiry" id="card_expiry-<?php echo $form_id ?>" class="card-expiry give-input required" placeholder="<?php esc_attr_e('MM / YY', 'give'); ?>" required aria-required="true"/>
891 891
 		</p>
892 892
 		<?php
893 893
 		/**
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
 		 *
898 898
 		 * @param int $form_id The form ID.
899 899
 		 */
900
-		do_action( 'give_after_cc_expiration', $form_id );
900
+		do_action('give_after_cc_expiration', $form_id);
901 901
 		?>
902 902
 	</fieldset>
903 903
 	<?php
@@ -908,12 +908,12 @@  discard block
 block discarded – undo
908 908
 	 *
909 909
 	 * @param int $form_id The form ID.
910 910
 	 */
911
-	do_action( 'give_after_cc_fields', $form_id );
911
+	do_action('give_after_cc_fields', $form_id);
912 912
 
913 913
 	echo ob_get_clean();
914 914
 }
915 915
 
916
-add_action( 'give_cc_form', 'give_get_cc_form' );
916
+add_action('give_cc_form', 'give_get_cc_form');
917 917
 
918 918
 /**
919 919
  * Outputs the default credit card address fields.
@@ -924,20 +924,20 @@  discard block
 block discarded – undo
924 924
  *
925 925
  * @return void
926 926
  */
927
-function give_default_cc_address_fields( $form_id ) {
927
+function give_default_cc_address_fields($form_id) {
928 928
 	// Get user info.
929
-	$give_user_info = _give_get_prefill_form_field_values( $form_id );
929
+	$give_user_info = _give_get_prefill_form_field_values($form_id);
930 930
 
931 931
 	$logged_in = is_user_logged_in();
932 932
 
933
-	if ( $logged_in ) {
934
-		$user_address = give_get_donor_address( get_current_user_id() );
933
+	if ($logged_in) {
934
+		$user_address = give_get_donor_address(get_current_user_id());
935 935
 	}
936 936
 
937 937
 	ob_start();
938 938
 	?>
939 939
 	<fieldset id="give_cc_address" class="cc-address">
940
-		<legend><?php echo apply_filters( 'give_billing_details_fieldset_heading', esc_html__( 'Billing Details', 'give' ) ); ?></legend>
940
+		<legend><?php echo apply_filters('give_billing_details_fieldset_heading', esc_html__('Billing Details', 'give')); ?></legend>
941 941
 		<?php
942 942
 		/**
943 943
 		 * Fires while rendering credit card billing form, before address fields.
@@ -946,36 +946,36 @@  discard block
 block discarded – undo
946 946
 		 *
947 947
 		 * @param int $form_id The form ID.
948 948
 		 */
949
-		do_action( 'give_cc_billing_top' );
949
+		do_action('give_cc_billing_top');
950 950
 
951 951
 		// For Country.
952 952
 		$selected_country = give_get_country();
953
-		if ( ! empty( $give_user_info['billing_country'] ) && '*' !== $give_user_info['billing_country'] ) {
953
+		if ( ! empty($give_user_info['billing_country']) && '*' !== $give_user_info['billing_country']) {
954 954
 			$selected_country = $give_user_info['billing_country'];
955 955
 		}
956 956
 		$countries = give_get_country_list();
957 957
 
958 958
 		// For state
959 959
 		$selected_state = '';
960
-		if ( $selected_country === give_get_country() ) {
960
+		if ($selected_country === give_get_country()) {
961 961
 			// Get defalut selected state by admin.
962 962
 			$selected_state = give_get_state();
963 963
 		}
964 964
 		// Get the last payment made by user states.
965
-		if ( ! empty( $give_user_info['card_state'] ) && '*' !== $give_user_info['card_state'] ) {
965
+		if ( ! empty($give_user_info['card_state']) && '*' !== $give_user_info['card_state']) {
966 966
 			$selected_state = $give_user_info['card_state'];
967 967
 		}
968 968
 		// Get the country code
969
-		if ( ! empty( $give_user_info['billing_country'] ) && '*' !== $give_user_info['billing_country'] ) {
969
+		if ( ! empty($give_user_info['billing_country']) && '*' !== $give_user_info['billing_country']) {
970 970
 			$selected_country = $give_user_info['billing_country'];
971 971
 		}
972
-		$label        = __( 'State', 'give' );
972
+		$label        = __('State', 'give');
973 973
 		$states_label = give_get_states_label();
974 974
 		// Check if $country code exists in the array key for states label.
975
-		if ( array_key_exists( $selected_country, $states_label ) ) {
976
-			$label = $states_label[ $selected_country ];
975
+		if (array_key_exists($selected_country, $states_label)) {
976
+			$label = $states_label[$selected_country];
977 977
 		}
978
-		$states = give_get_states( $selected_country );
978
+		$states = give_get_states($selected_country);
979 979
 		// Get the country list that do not have any states init.
980 980
 		$no_states_country = give_no_states_country_list();
981 981
 		// Get the country list that does not require states.
@@ -983,24 +983,24 @@  discard block
 block discarded – undo
983 983
 		?>
984 984
 	    <p id="give-card-country-wrap" class="form-row form-row-wide">
985 985
 		    <label for="billing_country" class="give-label">
986
-			    <?php esc_html_e( 'Country', 'give' ); ?>
987
-			    <?php if ( give_field_is_required( 'billing_country', $form_id ) ) : ?>
986
+			    <?php esc_html_e('Country', 'give'); ?>
987
+			    <?php if (give_field_is_required('billing_country', $form_id)) : ?>
988 988
 				    <span class="give-required-indicator">*</span>
989 989
 			    <?php endif; ?>
990 990
 			    <span class="give-tooltip give-icon give-icon-question"
991
-			          data-tooltip="<?php esc_attr_e( 'The country for your billing address.', 'give' ); ?>"></span>
991
+			          data-tooltip="<?php esc_attr_e('The country for your billing address.', 'give'); ?>"></span>
992 992
 		    </label>
993 993
 
994 994
 		    <select
995 995
 				    name="billing_country"
996 996
 				    autocomplete="country-name"
997 997
 				    id="billing_country"
998
-				    class="billing-country billing_country give-select<?php echo( give_field_is_required( 'billing_country', $form_id ) ? ' required' : '' ); ?>"
999
-			    <?php echo( give_field_is_required( 'billing_country', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
998
+				    class="billing-country billing_country give-select<?php echo(give_field_is_required('billing_country', $form_id) ? ' required' : ''); ?>"
999
+			    <?php echo(give_field_is_required('billing_country', $form_id) ? ' required aria-required="true" ' : ''); ?>
1000 1000
 		    >
1001 1001
 			    <?php
1002
-			    foreach ( $countries as $country_code => $country ) {
1003
-				    echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>';
1002
+			    foreach ($countries as $country_code => $country) {
1003
+				    echo '<option value="'.esc_attr($country_code).'"'.selected($country_code, $selected_country, false).'>'.$country.'</option>';
1004 1004
 			    }
1005 1005
 			    ?>
1006 1006
 		    </select>
@@ -1008,12 +1008,12 @@  discard block
 block discarded – undo
1008 1008
 
1009 1009
 		<p id="give-card-address-wrap" class="form-row form-row-wide">
1010 1010
 			<label for="card_address" class="give-label">
1011
-				<?php _e( 'Address 1', 'give' ); ?>
1011
+				<?php _e('Address 1', 'give'); ?>
1012 1012
 				<?php
1013
-				if ( give_field_is_required( 'card_address', $form_id ) ) : ?>
1013
+				if (give_field_is_required('card_address', $form_id)) : ?>
1014 1014
 					<span class="give-required-indicator">*</span>
1015 1015
 				<?php endif; ?>
1016
-				<?php echo Give()->tooltips->render_help( __( 'The primary billing address for your credit card.', 'give' ) ); ?>
1016
+				<?php echo Give()->tooltips->render_help(__('The primary billing address for your credit card.', 'give')); ?>
1017 1017
 			</label>
1018 1018
 
1019 1019
 			<input
@@ -1021,20 +1021,20 @@  discard block
 block discarded – undo
1021 1021
 					id="card_address"
1022 1022
 					name="card_address"
1023 1023
 					autocomplete="address-line1"
1024
-					class="card-address give-input<?php echo( give_field_is_required( 'card_address', $form_id ) ? ' required' : '' ); ?>"
1025
-					placeholder="<?php _e( 'Address line 1', 'give' ); ?>"
1026
-					value="<?php echo isset( $give_user_info['card_address'] ) ? $give_user_info['card_address'] : ''; ?>"
1027
-				<?php echo( give_field_is_required( 'card_address', $form_id ) ? '  required aria-required="true" ' : '' ); ?>
1024
+					class="card-address give-input<?php echo(give_field_is_required('card_address', $form_id) ? ' required' : ''); ?>"
1025
+					placeholder="<?php _e('Address line 1', 'give'); ?>"
1026
+					value="<?php echo isset($give_user_info['card_address']) ? $give_user_info['card_address'] : ''; ?>"
1027
+				<?php echo(give_field_is_required('card_address', $form_id) ? '  required aria-required="true" ' : ''); ?>
1028 1028
 			/>
1029 1029
 		</p>
1030 1030
 
1031 1031
 		<p id="give-card-address-2-wrap" class="form-row form-row-wide">
1032 1032
 			<label for="card_address_2" class="give-label">
1033
-				<?php _e( 'Address 2', 'give' ); ?>
1034
-				<?php if ( give_field_is_required( 'card_address_2', $form_id ) ) : ?>
1033
+				<?php _e('Address 2', 'give'); ?>
1034
+				<?php if (give_field_is_required('card_address_2', $form_id)) : ?>
1035 1035
 					<span class="give-required-indicator">*</span>
1036 1036
 				<?php endif; ?>
1037
-				<?php echo Give()->tooltips->render_help( __( '(optional) The suite, apartment number, post office box (etc) associated with your billing address.', 'give' ) ); ?>
1037
+				<?php echo Give()->tooltips->render_help(__('(optional) The suite, apartment number, post office box (etc) associated with your billing address.', 'give')); ?>
1038 1038
 			</label>
1039 1039
 
1040 1040
 			<input
@@ -1042,56 +1042,56 @@  discard block
 block discarded – undo
1042 1042
 					id="card_address_2"
1043 1043
 					name="card_address_2"
1044 1044
 					autocomplete="address-line2"
1045
-					class="card-address-2 give-input<?php echo( give_field_is_required( 'card_address_2', $form_id ) ? ' required' : '' ); ?>"
1046
-					placeholder="<?php _e( 'Address line 2', 'give' ); ?>"
1047
-					value="<?php echo isset( $give_user_info['card_address_2'] ) ? $give_user_info['card_address_2'] : ''; ?>"
1048
-				<?php echo( give_field_is_required( 'card_address_2', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
1045
+					class="card-address-2 give-input<?php echo(give_field_is_required('card_address_2', $form_id) ? ' required' : ''); ?>"
1046
+					placeholder="<?php _e('Address line 2', 'give'); ?>"
1047
+					value="<?php echo isset($give_user_info['card_address_2']) ? $give_user_info['card_address_2'] : ''; ?>"
1048
+				<?php echo(give_field_is_required('card_address_2', $form_id) ? ' required aria-required="true" ' : ''); ?>
1049 1049
 			/>
1050 1050
 		</p>
1051 1051
 
1052 1052
 		<p id="give-card-city-wrap" class="form-row form-row-wide">
1053 1053
 			<label for="card_city" class="give-label">
1054
-				<?php _e( 'City', 'give' ); ?>
1055
-				<?php if ( give_field_is_required( 'card_city', $form_id ) ) : ?>
1054
+				<?php _e('City', 'give'); ?>
1055
+				<?php if (give_field_is_required('card_city', $form_id)) : ?>
1056 1056
 					<span class="give-required-indicator">*</span>
1057 1057
 				<?php endif; ?>
1058
-				<?php echo Give()->tooltips->render_help( __( 'The city for your billing address.', 'give' ) ); ?>
1058
+				<?php echo Give()->tooltips->render_help(__('The city for your billing address.', 'give')); ?>
1059 1059
 			</label>
1060 1060
 			<input
1061 1061
 					type="text"
1062 1062
 					id="card_city"
1063 1063
 					name="card_city"
1064 1064
 					autocomplete="address-level3"
1065
-					class="card-city give-input<?php echo( give_field_is_required( 'card_city', $form_id ) ? ' required' : '' ); ?>"
1066
-					placeholder="<?php _e( 'City', 'give' ); ?>"
1067
-					value="<?php echo isset( $give_user_info['card_city'] ) ? $give_user_info['card_city'] : ''; ?>"
1068
-				<?php echo( give_field_is_required( 'card_city', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
1065
+					class="card-city give-input<?php echo(give_field_is_required('card_city', $form_id) ? ' required' : ''); ?>"
1066
+					placeholder="<?php _e('City', 'give'); ?>"
1067
+					value="<?php echo isset($give_user_info['card_city']) ? $give_user_info['card_city'] : ''; ?>"
1068
+				<?php echo(give_field_is_required('card_city', $form_id) ? ' required aria-required="true" ' : ''); ?>
1069 1069
 			/>
1070 1070
 		</p>
1071 1071
 
1072 1072
 	    <p id="give-card-state-wrap"
1073
-	       class="form-row form-row-first form-row-responsive <?php echo ( ! empty( $selected_country ) && array_key_exists( $selected_country, $no_states_country ) ) ? 'give-hidden' : ''; ?> ">
1073
+	       class="form-row form-row-first form-row-responsive <?php echo ( ! empty($selected_country) && array_key_exists($selected_country, $no_states_country)) ? 'give-hidden' : ''; ?> ">
1074 1074
 		    <label for="card_state" class="give-label">
1075 1075
 			    <span class="state-label-text"><?php echo $label; ?></span>
1076
-			    <?php if ( give_field_is_required( 'card_state', $form_id ) ) :
1076
+			    <?php if (give_field_is_required('card_state', $form_id)) :
1077 1077
 				    ?>
1078
-				    <span class="give-required-indicator <?php echo( array_key_exists( $selected_country, $states_not_required_country_list ) ? 'give-hidden' : '' ) ?> ">*</span>
1078
+				    <span class="give-required-indicator <?php echo(array_key_exists($selected_country, $states_not_required_country_list) ? 'give-hidden' : '') ?> ">*</span>
1079 1079
 			    <?php endif; ?>
1080 1080
 			    <span class="give-tooltip give-icon give-icon-question"
1081
-			          data-tooltip="<?php esc_attr_e( 'The state, province, or county for your billing address.', 'give' ); ?>"></span>
1081
+			          data-tooltip="<?php esc_attr_e('The state, province, or county for your billing address.', 'give'); ?>"></span>
1082 1082
 		    </label>
1083 1083
 		    <?php
1084 1084
 
1085
-		    if ( ! empty( $states ) ) : ?>
1085
+		    if ( ! empty($states)) : ?>
1086 1086
 			    <select
1087 1087
 					    name="card_state"
1088 1088
 					    autocomplete="address-level4"
1089 1089
 					    id="card_state"
1090
-					    class="card_state give-select<?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required' : '' ); ?>"
1091
-				    <?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required aria-required="true" ' : '' ); ?>>
1090
+					    class="card_state give-select<?php echo(give_field_is_required('card_state', $form_id) ? ' required' : ''); ?>"
1091
+				    <?php echo(give_field_is_required('card_state', $form_id) ? ' required aria-required="true" ' : ''); ?>>
1092 1092
 				    <?php
1093
-				    foreach ( $states as $state_code => $state ) {
1094
-					    echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>';
1093
+				    foreach ($states as $state_code => $state) {
1094
+					    echo '<option value="'.$state_code.'"'.selected($state_code, $selected_state, false).'>'.$state.'</option>';
1095 1095
 				    }
1096 1096
 				    ?>
1097 1097
 			    </select>
@@ -1103,11 +1103,11 @@  discard block
 block discarded – undo
1103 1103
 
1104 1104
 		<p id="give-card-zip-wrap" class="form-row form-row-last form-row-responsive">
1105 1105
 			<label for="card_zip" class="give-label">
1106
-				<?php _e( 'Zip / Postal Code', 'give' ); ?>
1107
-				<?php if ( give_field_is_required( 'card_zip', $form_id ) ) : ?>
1106
+				<?php _e('Zip / Postal Code', 'give'); ?>
1107
+				<?php if (give_field_is_required('card_zip', $form_id)) : ?>
1108 1108
 					<span class="give-required-indicator">*</span>
1109 1109
 				<?php endif; ?>
1110
-				<?php echo Give()->tooltips->render_help( __( 'The ZIP Code or postal code for your billing address.', 'give' ) ); ?>
1110
+				<?php echo Give()->tooltips->render_help(__('The ZIP Code or postal code for your billing address.', 'give')); ?>
1111 1111
 			</label>
1112 1112
 
1113 1113
 			<input
@@ -1116,10 +1116,10 @@  discard block
 block discarded – undo
1116 1116
 					id="card_zip"
1117 1117
 					name="card_zip"
1118 1118
 					autocomplete="postal-code"
1119
-					class="card-zip give-input<?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required' : '' ); ?>"
1120
-					placeholder="<?php _e( 'Zip / Postal Code', 'give' ); ?>"
1121
-					value="<?php echo isset( $give_user_info['card_zip'] ) ? $give_user_info['card_zip'] : ''; ?>"
1122
-				<?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
1119
+					class="card-zip give-input<?php echo(give_field_is_required('card_zip', $form_id) ? ' required' : ''); ?>"
1120
+					placeholder="<?php _e('Zip / Postal Code', 'give'); ?>"
1121
+					value="<?php echo isset($give_user_info['card_zip']) ? $give_user_info['card_zip'] : ''; ?>"
1122
+				<?php echo(give_field_is_required('card_zip', $form_id) ? ' required aria-required="true" ' : ''); ?>
1123 1123
 			/>
1124 1124
 		</p>
1125 1125
 		<?php
@@ -1130,14 +1130,14 @@  discard block
 block discarded – undo
1130 1130
 		 *
1131 1131
 		 * @param int $form_id The form ID.
1132 1132
 		 */
1133
-		do_action( 'give_cc_billing_bottom' );
1133
+		do_action('give_cc_billing_bottom');
1134 1134
 		?>
1135 1135
 	</fieldset>
1136 1136
 	<?php
1137 1137
 	echo ob_get_clean();
1138 1138
 }
1139 1139
 
1140
-add_action( 'give_after_cc_fields', 'give_default_cc_address_fields' );
1140
+add_action('give_after_cc_fields', 'give_default_cc_address_fields');
1141 1141
 
1142 1142
 
1143 1143
 /**
@@ -1150,15 +1150,15 @@  discard block
 block discarded – undo
1150 1150
  *
1151 1151
  * @return string
1152 1152
  */
1153
-function give_get_register_fields( $form_id ) {
1153
+function give_get_register_fields($form_id) {
1154 1154
 
1155 1155
 	global $user_ID;
1156 1156
 
1157
-	if ( is_user_logged_in() ) {
1158
-		$user_data = get_userdata( $user_ID );
1157
+	if (is_user_logged_in()) {
1158
+		$user_data = get_userdata($user_ID);
1159 1159
 	}
1160 1160
 
1161
-	$show_register_form = give_show_login_register_option( $form_id );
1161
+	$show_register_form = give_show_login_register_option($form_id);
1162 1162
 
1163 1163
 	ob_start(); ?>
1164 1164
 	<fieldset id="give-register-fields-<?php echo $form_id; ?>">
@@ -1171,7 +1171,7 @@  discard block
 block discarded – undo
1171 1171
 		 *
1172 1172
 		 * @param int $form_id The form ID.
1173 1173
 		 */
1174
-		do_action( 'give_register_fields_before', $form_id );
1174
+		do_action('give_register_fields_before', $form_id);
1175 1175
 		?>
1176 1176
 
1177 1177
 		<fieldset id="give-register-account-fields-<?php echo $form_id; ?>">
@@ -1183,24 +1183,24 @@  discard block
 block discarded – undo
1183 1183
 			 *
1184 1184
 			 * @param int $form_id The form ID.
1185 1185
 			 */
1186
-			do_action( 'give_register_account_fields_before', $form_id );
1186
+			do_action('give_register_account_fields_before', $form_id);
1187 1187
 
1188
-			$class = ( 'registration' === $show_register_form) ? 'form-row-wide' : 'form-row-first';
1188
+			$class = ('registration' === $show_register_form) ? 'form-row-wide' : 'form-row-first';
1189 1189
 			?>
1190
-			<div id="give-create-account-wrap-<?php echo $form_id; ?>" class="form-row <?php echo esc_attr( $class ); ?> form-row-responsive">
1190
+			<div id="give-create-account-wrap-<?php echo $form_id; ?>" class="form-row <?php echo esc_attr($class); ?> form-row-responsive">
1191 1191
 				<label for="give-create-account-<?php echo $form_id; ?>">
1192 1192
 					<?php
1193 1193
 					// Add attributes to checkbox, if Guest Checkout is disabled.
1194
-					$is_guest_checkout = give_get_meta( $form_id, '_give_logged_in_only', true );
1195
-					$id                = 'give-create-account-' . $form_id;
1196
-					if ( ! give_is_setting_enabled( $is_guest_checkout ) ) {
1194
+					$is_guest_checkout = give_get_meta($form_id, '_give_logged_in_only', true);
1195
+					$id                = 'give-create-account-'.$form_id;
1196
+					if ( ! give_is_setting_enabled($is_guest_checkout)) {
1197 1197
 						echo Give()->tooltips->render(
1198 1198
 							array(
1199 1199
 								'tag_content' => sprintf(
1200 1200
 									'<input type="checkbox" name="give_create_account" value="on" id="%s" class="give-input give-disabled" checked />',
1201 1201
 									$id
1202 1202
 								),
1203
-								'label'       => __( 'Registration is required to donate.', 'give' ),
1203
+								'label'       => __('Registration is required to donate.', 'give'),
1204 1204
 							) );
1205 1205
 					} else {
1206 1206
 						?>
@@ -1208,17 +1208,17 @@  discard block
 block discarded – undo
1208 1208
 						<?php
1209 1209
 					}
1210 1210
 					?>
1211
-					<?php _e( 'Create an account', 'give' ); ?>
1212
-					<?php echo Give()->tooltips->render_help( __( 'Create an account on the site to see and manage donation history.', 'give' ) ); ?>
1213
-					<?php wp_nonce_field( 'give_form_create_user_nonce', 'give-form-user-register-hash', false, true );?>
1211
+					<?php _e('Create an account', 'give'); ?>
1212
+					<?php echo Give()->tooltips->render_help(__('Create an account on the site to see and manage donation history.', 'give')); ?>
1213
+					<?php wp_nonce_field('give_form_create_user_nonce', 'give-form-user-register-hash', false, true); ?>
1214 1214
 				</label>
1215 1215
 			</div>
1216 1216
 
1217
-			<?php if ( 'both' === $show_register_form ) { ?>
1217
+			<?php if ('both' === $show_register_form) { ?>
1218 1218
 				<div class="give-login-account-wrap form-row form-row-last form-row-responsive">
1219
-					<p class="give-login-message"><?php esc_html_e( 'Already have an account?', 'give' ); ?>&nbsp;
1220
-						<a href="<?php echo esc_url( add_query_arg( 'login', 1 ) ); ?>" class="give-checkout-login"
1221
-						   data-action="give_checkout_login"><?php esc_html_e( 'Login', 'give' ); ?></a>
1219
+					<p class="give-login-message"><?php esc_html_e('Already have an account?', 'give'); ?>&nbsp;
1220
+						<a href="<?php echo esc_url(add_query_arg('login', 1)); ?>" class="give-checkout-login"
1221
+						   data-action="give_checkout_login"><?php esc_html_e('Login', 'give'); ?></a>
1222 1222
 					</p>
1223 1223
 					<p class="give-loading-text">
1224 1224
 						<span class="give-loading-animation"></span>
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
 			 *
1235 1235
 			 * @param int $form_id The form ID.
1236 1236
 			 */
1237
-			do_action( 'give_register_account_fields_after', $form_id );
1237
+			do_action('give_register_account_fields_after', $form_id);
1238 1238
 			?>
1239 1239
 		</fieldset>
1240 1240
 
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 		 *
1247 1247
 		 * @param int $form_id The form ID.
1248 1248
 		 */
1249
-		do_action( 'give_register_fields_after', $form_id );
1249
+		do_action('give_register_fields_after', $form_id);
1250 1250
 		?>
1251 1251
 
1252 1252
 		<input type="hidden" name="give-purchase-var" value="needs-to-register"/>
@@ -1257,7 +1257,7 @@  discard block
 block discarded – undo
1257 1257
 		 *
1258 1258
 		 * @since 1.7
1259 1259
 		 */
1260
-		do_action( 'give_donation_form_user_info', $form_id );
1260
+		do_action('give_donation_form_user_info', $form_id);
1261 1261
 		?>
1262 1262
 
1263 1263
 	</fieldset>
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
 	echo ob_get_clean();
1266 1266
 }
1267 1267
 
1268
-add_action( 'give_donation_form_register_fields', 'give_get_register_fields' );
1268
+add_action('give_donation_form_register_fields', 'give_get_register_fields');
1269 1269
 
1270 1270
 /**
1271 1271
  * Gets the login fields for the login form on the checkout. This function hooks
@@ -1278,28 +1278,28 @@  discard block
 block discarded – undo
1278 1278
  *
1279 1279
  * @return string
1280 1280
  */
1281
-function give_get_login_fields( $form_id ) {
1281
+function give_get_login_fields($form_id) {
1282 1282
 
1283
-	$form_id            = isset( $_POST['form_id'] ) ? $_POST['form_id'] : $form_id;
1284
-	$show_register_form = give_show_login_register_option( $form_id );
1283
+	$form_id            = isset($_POST['form_id']) ? $_POST['form_id'] : $form_id;
1284
+	$show_register_form = give_show_login_register_option($form_id);
1285 1285
 
1286 1286
 	ob_start();
1287 1287
 	?>
1288 1288
 	<fieldset id="give-login-fields-<?php echo $form_id; ?>">
1289
-		<legend><?php echo apply_filters( 'give_account_login_fieldset_heading', __( 'Login to Your Account', 'give' ) );
1290
-			if ( ! give_logged_in_only( $form_id ) ) {
1291
-				echo ' <span class="sub-text">' . __( '(optional)', 'give' ) . '</span>';
1289
+		<legend><?php echo apply_filters('give_account_login_fieldset_heading', __('Login to Your Account', 'give'));
1290
+			if ( ! give_logged_in_only($form_id)) {
1291
+				echo ' <span class="sub-text">'.__('(optional)', 'give').'</span>';
1292 1292
 			} ?>
1293 1293
 		</legend>
1294
-		<?php if ( $show_register_form == 'both' ) { ?>
1294
+		<?php if ($show_register_form == 'both') { ?>
1295 1295
 			<p class="give-new-account-link">
1296
-				<?php _e( 'Don\'t have an account?', 'give' ); ?>&nbsp;
1297
-				<a href="<?php echo remove_query_arg( 'login' ); ?>" class="give-checkout-register-cancel"
1296
+				<?php _e('Don\'t have an account?', 'give'); ?>&nbsp;
1297
+				<a href="<?php echo remove_query_arg('login'); ?>" class="give-checkout-register-cancel"
1298 1298
 				   data-action="give_checkout_register">
1299
-					<?php if ( give_logged_in_only( $form_id ) ) {
1300
-					    _e( 'Register as a part of your donation &raquo;', 'give' );
1299
+					<?php if (give_logged_in_only($form_id)) {
1300
+					    _e('Register as a part of your donation &raquo;', 'give');
1301 1301
                     } else {
1302
-						 _e( 'Register or donate as a guest &raquo;', 'give' );
1302
+						 _e('Register or donate as a guest &raquo;', 'give');
1303 1303
 					} ?>
1304 1304
 				</a>
1305 1305
 			</p>
@@ -1315,49 +1315,49 @@  discard block
 block discarded – undo
1315 1315
 		 *
1316 1316
 		 * @param int $form_id The form ID.
1317 1317
 		 */
1318
-		do_action( 'give_checkout_login_fields_before', $form_id );
1318
+		do_action('give_checkout_login_fields_before', $form_id);
1319 1319
 		?>
1320 1320
 		<div id="give-user-login-wrap-<?php echo $form_id; ?>" class="form-row form-row-first form-row-responsive">
1321 1321
 			<label class="give-label" for="give-user-login-<?php echo $form_id; ?>">
1322
-				<?php _e( 'Username', 'give' ); ?>
1323
-				<?php if ( give_logged_in_only( $form_id ) ) { ?>
1322
+				<?php _e('Username', 'give'); ?>
1323
+				<?php if (give_logged_in_only($form_id)) { ?>
1324 1324
 					<span class="give-required-indicator">*</span>
1325 1325
 				<?php } ?>
1326 1326
 			</label>
1327 1327
 
1328
-			<input class="give-input<?php echo ( give_logged_in_only( $form_id ) ) ? ' required' : ''; ?>" type="text"
1328
+			<input class="give-input<?php echo (give_logged_in_only($form_id)) ? ' required' : ''; ?>" type="text"
1329 1329
 				   name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" value=""
1330
-				   placeholder="<?php _e( 'Your username', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/>
1330
+				   placeholder="<?php _e('Your username', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/>
1331 1331
 		</div>
1332 1332
 
1333 1333
 		<div id="give-user-pass-wrap-<?php echo $form_id; ?>"
1334 1334
 			 class="give_login_password form-row form-row-last form-row-responsive">
1335 1335
 			<label class="give-label" for="give-user-pass-<?php echo $form_id; ?>">
1336
-				<?php _e( 'Password', 'give' ); ?>
1337
-				<?php if ( give_logged_in_only( $form_id ) ) { ?>
1336
+				<?php _e('Password', 'give'); ?>
1337
+				<?php if (give_logged_in_only($form_id)) { ?>
1338 1338
 					<span class="give-required-indicator">*</span>
1339 1339
 				<?php } ?>
1340 1340
 			</label>
1341
-			<input class="give-input<?php echo ( give_logged_in_only( $form_id ) ) ? ' required' : ''; ?>"
1341
+			<input class="give-input<?php echo (give_logged_in_only($form_id)) ? ' required' : ''; ?>"
1342 1342
 				   type="password" name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>"
1343
-				   placeholder="<?php _e( 'Your password', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/>
1343
+				   placeholder="<?php _e('Your password', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/>
1344 1344
 			<input type="hidden" name="give-purchase-var" value="needs-to-login"/>
1345 1345
 		</div>
1346 1346
 
1347 1347
 		<div id="give-forgot-password-wrap-<?php echo $form_id; ?>" class="give_login_forgot_password">
1348 1348
 			 <span class="give-forgot-password ">
1349 1349
 				 <a href="<?php echo wp_lostpassword_url() ?>"
1350
-					target="_blank"><?php _e( 'Reset Password', 'give' ) ?></a>
1350
+					target="_blank"><?php _e('Reset Password', 'give') ?></a>
1351 1351
 			 </span>
1352 1352
 		</div>
1353 1353
 
1354 1354
 		<div id="give-user-login-submit-<?php echo $form_id; ?>" class="give-clearfix">
1355 1355
 			<input type="submit" class="give-submit give-btn button" name="give_login_submit"
1356
-				   value="<?php _e( 'Login', 'give' ); ?>"/>
1357
-			<?php if ( $show_register_form !== 'login' ) { ?>
1356
+				   value="<?php _e('Login', 'give'); ?>"/>
1357
+			<?php if ($show_register_form !== 'login') { ?>
1358 1358
 				<input type="button" data-action="give_cancel_login"
1359 1359
 					   class="give-cancel-login give-checkout-register-cancel give-btn button" name="give_login_cancel"
1360
-					   value="<?php _e( 'Cancel', 'give' ); ?>"/>
1360
+					   value="<?php _e('Cancel', 'give'); ?>"/>
1361 1361
 			<?php } ?>
1362 1362
 			<span class="give-loading-animation"></span>
1363 1363
 		</div>
@@ -1369,14 +1369,14 @@  discard block
 block discarded – undo
1369 1369
 		 *
1370 1370
 		 * @param int $form_id The form ID.
1371 1371
 		 */
1372
-		do_action( 'give_checkout_login_fields_after', $form_id );
1372
+		do_action('give_checkout_login_fields_after', $form_id);
1373 1373
 		?>
1374 1374
 	</fieldset><!--end #give-login-fields-->
1375 1375
 	<?php
1376 1376
 	echo ob_get_clean();
1377 1377
 }
1378 1378
 
1379
-add_action( 'give_donation_form_login_fields', 'give_get_login_fields', 10, 1 );
1379
+add_action('give_donation_form_login_fields', 'give_get_login_fields', 10, 1);
1380 1380
 
1381 1381
 /**
1382 1382
  * Payment Mode Select.
@@ -1392,10 +1392,10 @@  discard block
 block discarded – undo
1392 1392
  *
1393 1393
  * @return void
1394 1394
  */
1395
-function give_payment_mode_select( $form_id, $args ) {
1395
+function give_payment_mode_select($form_id, $args) {
1396 1396
 
1397
-	$gateways  = give_get_enabled_payment_gateways( $form_id );
1398
-	$id_prefix = ! empty( $args['id_prefix'] ) ? $args['id_prefix'] : '';
1397
+	$gateways  = give_get_enabled_payment_gateways($form_id);
1398
+	$id_prefix = ! empty($args['id_prefix']) ? $args['id_prefix'] : '';
1399 1399
 
1400 1400
 	/**
1401 1401
 	 * Fires while selecting payment gateways, before the fields.
@@ -1404,10 +1404,10 @@  discard block
 block discarded – undo
1404 1404
 	 *
1405 1405
 	 * @param int $form_id The form ID.
1406 1406
 	 */
1407
-	do_action( 'give_payment_mode_top', $form_id );
1407
+	do_action('give_payment_mode_top', $form_id);
1408 1408
 	?>
1409 1409
 
1410
-	<fieldset id="give-payment-mode-select" <?php if ( count( $gateways ) <= 1 ) {
1410
+	<fieldset id="give-payment-mode-select" <?php if (count($gateways) <= 1) {
1411 1411
 		echo 'style="display: none;"';
1412 1412
 	} ?>>
1413 1413
 		<?php
@@ -1418,10 +1418,10 @@  discard block
 block discarded – undo
1418 1418
 		 *
1419 1419
 		 * @param int $form_id The form ID.
1420 1420
 		 */
1421
-		do_action( 'give_payment_mode_before_gateways_wrap' );
1421
+		do_action('give_payment_mode_before_gateways_wrap');
1422 1422
 		?>
1423 1423
 		<legend
1424
-				class="give-payment-mode-label"><?php echo apply_filters( 'give_checkout_payment_method_text', esc_html__( 'Select Payment Method', 'give' ) ); ?>
1424
+				class="give-payment-mode-label"><?php echo apply_filters('give_checkout_payment_method_text', esc_html__('Select Payment Method', 'give')); ?>
1425 1425
 			<span class="give-loading-text"><span
1426 1426
 						class="give-loading-animation"></span>
1427 1427
             </span>
@@ -1434,37 +1434,36 @@  discard block
 block discarded – undo
1434 1434
 			 *
1435 1435
 			 * @since 1.7
1436 1436
 			 */
1437
-			do_action( 'give_payment_mode_before_gateways' )
1437
+			do_action('give_payment_mode_before_gateways')
1438 1438
 			?>
1439 1439
 			<ul id="give-gateway-radio-list">
1440 1440
 				<?php
1441 1441
 				/**
1442 1442
 				 * Loop through the active payment gateways.
1443 1443
 				 */
1444
-				$selected_gateway = give_get_chosen_gateway( $form_id );
1444
+				$selected_gateway = give_get_chosen_gateway($form_id);
1445 1445
 				$give_settings    = give_get_settings();
1446
-				$gateways_label   = array_key_exists( 'gateways_label', $give_settings ) ?
1447
-					$give_settings['gateways_label'] :
1448
-					array();
1446
+				$gateways_label   = array_key_exists('gateways_label', $give_settings) ?
1447
+					$give_settings['gateways_label'] : array();
1449 1448
 
1450
-				foreach ( $gateways as $gateway_id => $gateway ) :
1449
+				foreach ($gateways as $gateway_id => $gateway) :
1451 1450
 					//Determine the default gateway.
1452
-					$checked = checked( $gateway_id, $selected_gateway, false );
1451
+					$checked = checked($gateway_id, $selected_gateway, false);
1453 1452
 					$checked_class = $checked ? ' class="give-gateway-option-selected"' : ''; ?>
1454 1453
 					<li<?php echo $checked_class ?>>
1455 1454
 						<input type="radio" name="payment-mode" class="give-gateway"
1456
-							   id="give-gateway-<?php echo esc_attr( $gateway_id . '-' . $id_prefix ); ?>"
1457
-							   value="<?php echo esc_attr( $gateway_id ); ?>"<?php echo $checked; ?>>
1455
+							   id="give-gateway-<?php echo esc_attr($gateway_id.'-'.$id_prefix); ?>"
1456
+							   value="<?php echo esc_attr($gateway_id); ?>"<?php echo $checked; ?>>
1458 1457
 
1459 1458
 						<?php
1460 1459
 						$label = $gateway['checkout_label'];
1461
-						if ( ! empty( $gateways_label[ $gateway_id  ] ) ) {
1462
-							$label = $gateways_label[ $gateway_id ];
1460
+						if ( ! empty($gateways_label[$gateway_id])) {
1461
+							$label = $gateways_label[$gateway_id];
1463 1462
 						}
1464 1463
 						?>
1465
-						<label for="give-gateway-<?php echo esc_attr( $gateway_id . '-' . $id_prefix ); ?>"
1464
+						<label for="give-gateway-<?php echo esc_attr($gateway_id.'-'.$id_prefix); ?>"
1466 1465
 							   class="give-gateway-option"
1467
-							   id="give-gateway-option-<?php echo esc_attr( $gateway_id ); ?>"> <?php echo esc_html( $label ); ?></label>
1466
+							   id="give-gateway-option-<?php echo esc_attr($gateway_id); ?>"> <?php echo esc_html($label); ?></label>
1468 1467
 					</li>
1469 1468
 					<?php
1470 1469
 				endforeach;
@@ -1476,7 +1475,7 @@  discard block
 block discarded – undo
1476 1475
 			 *
1477 1476
 			 * @since 1.7
1478 1477
 			 */
1479
-			do_action( 'give_payment_mode_after_gateways' );
1478
+			do_action('give_payment_mode_after_gateways');
1480 1479
 			?>
1481 1480
 		</div>
1482 1481
 		<?php
@@ -1487,7 +1486,7 @@  discard block
 block discarded – undo
1487 1486
 		 *
1488 1487
 		 * @param int $form_id The form ID.
1489 1488
 		 */
1490
-		do_action( 'give_payment_mode_after_gateways_wrap' );
1489
+		do_action('give_payment_mode_after_gateways_wrap');
1491 1490
 		?>
1492 1491
 	</fieldset>
1493 1492
 
@@ -1499,7 +1498,7 @@  discard block
 block discarded – undo
1499 1498
 	 *
1500 1499
 	 * @param int $form_id The form ID.
1501 1500
 	 */
1502
-	do_action( 'give_payment_mode_bottom', $form_id );
1501
+	do_action('give_payment_mode_bottom', $form_id);
1503 1502
 	?>
1504 1503
 
1505 1504
 	<div id="give_purchase_form_wrap">
@@ -1510,7 +1509,7 @@  discard block
 block discarded – undo
1510 1509
 		 *
1511 1510
 		 * @since 1.7
1512 1511
 		 */
1513
-		do_action( 'give_donation_form', $form_id, $args );
1512
+		do_action('give_donation_form', $form_id, $args);
1514 1513
 		?>
1515 1514
 
1516 1515
 	</div>
@@ -1521,10 +1520,10 @@  discard block
 block discarded – undo
1521 1520
 	 *
1522 1521
 	 * @since 1.7
1523 1522
 	 */
1524
-	do_action( 'give_donation_form_wrap_bottom', $form_id );
1523
+	do_action('give_donation_form_wrap_bottom', $form_id);
1525 1524
 }
1526 1525
 
1527
-add_action( 'give_payment_mode_select', 'give_payment_mode_select', 10, 2 );
1526
+add_action('give_payment_mode_select', 'give_payment_mode_select', 10, 2);
1528 1527
 
1529 1528
 /**
1530 1529
  * Renders the Checkout Agree to Terms, this displays a checkbox for users to
@@ -1537,22 +1536,22 @@  discard block
 block discarded – undo
1537 1536
  *
1538 1537
  * @return bool
1539 1538
  */
1540
-function give_terms_agreement( $form_id ) {
1541
-	$form_option = give_get_meta( $form_id, '_give_terms_option', true );
1539
+function give_terms_agreement($form_id) {
1540
+	$form_option = give_get_meta($form_id, '_give_terms_option', true);
1542 1541
 
1543 1542
 	// Bailout if per form and global term and conditions is not setup.
1544 1543
 	if (
1545
-		give_is_setting_enabled( $form_option, 'global' )
1546
-		&& give_is_setting_enabled( give_get_option( 'terms' ) )
1544
+		give_is_setting_enabled($form_option, 'global')
1545
+		&& give_is_setting_enabled(give_get_option('terms'))
1547 1546
 	) {
1548
-		$label         = give_get_option( 'agree_to_terms_label', esc_html__( 'Agree to Terms?', 'give' ) );
1549
-		$terms         = $terms = give_get_option( 'agreement_text', '' );
1550
-		$edit_term_url = admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=display&section=term-and-conditions' );
1547
+		$label         = give_get_option('agree_to_terms_label', esc_html__('Agree to Terms?', 'give'));
1548
+		$terms         = $terms = give_get_option('agreement_text', '');
1549
+		$edit_term_url = admin_url('edit.php?post_type=give_forms&page=give-settings&tab=display&section=term-and-conditions');
1551 1550
 
1552
-	} elseif ( give_is_setting_enabled( $form_option ) ) {
1553
-		$label         = ( $label = give_get_meta( $form_id, '_give_agree_label', true ) ) ? stripslashes( $label ) : esc_html__( 'Agree to Terms?', 'give' );
1554
-		$terms         = give_get_meta( $form_id, '_give_agree_text', true );
1555
-		$edit_term_url = admin_url( 'post.php?post=' . $form_id . '&action=edit#form_terms_options' );
1551
+	} elseif (give_is_setting_enabled($form_option)) {
1552
+		$label         = ($label = give_get_meta($form_id, '_give_agree_label', true)) ? stripslashes($label) : esc_html__('Agree to Terms?', 'give');
1553
+		$terms         = give_get_meta($form_id, '_give_agree_text', true);
1554
+		$edit_term_url = admin_url('post.php?post='.$form_id.'&action=edit#form_terms_options');
1556 1555
 
1557 1556
 	} else {
1558 1557
 		return false;
@@ -1560,9 +1559,9 @@  discard block
 block discarded – undo
1560 1559
 
1561 1560
 
1562 1561
 	// Bailout: Check if term and conditions text is empty or not.
1563
-	if ( empty( $terms ) ) {
1564
-		if ( is_user_logged_in() && current_user_can( 'edit_give_forms' ) ) {
1565
-			echo sprintf( __( 'Please enter valid terms and conditions in <a href="%s">this form\'s settings</a>.', 'give' ), $edit_term_url );
1562
+	if (empty($terms)) {
1563
+		if (is_user_logged_in() && current_user_can('edit_give_forms')) {
1564
+			echo sprintf(__('Please enter valid terms and conditions in <a href="%s">this form\'s settings</a>.', 'give'), $edit_term_url);
1566 1565
 		}
1567 1566
 
1568 1567
 		return false;
@@ -1573,11 +1572,11 @@  discard block
 block discarded – undo
1573 1572
 	 *
1574 1573
 	 * @since  2.1.5
1575 1574
 	 */
1576
-	$terms = apply_filters( 'give_the_term_content',  wpautop( do_shortcode( $terms ) ), $terms, $form_id );
1575
+	$terms = apply_filters('give_the_term_content', wpautop(do_shortcode($terms)), $terms, $form_id);
1577 1576
 
1578 1577
 	?>
1579 1578
 	<fieldset id="give_terms_agreement">
1580
-		<legend><?php echo apply_filters( 'give_terms_agreement_text', esc_html__( 'Terms', 'give' ) ); ?></legend>
1579
+		<legend><?php echo apply_filters('give_terms_agreement_text', esc_html__('Terms', 'give')); ?></legend>
1581 1580
 		<div id="give_terms" class="give_terms-<?php echo $form_id; ?>" style="display:none;">
1582 1581
 			<?php
1583 1582
 			/**
@@ -1585,7 +1584,7 @@  discard block
 block discarded – undo
1585 1584
 			 *
1586 1585
 			 * @since 1.0
1587 1586
 			 */
1588
-			do_action( 'give_before_terms' );
1587
+			do_action('give_before_terms');
1589 1588
 
1590 1589
 			echo $terms;
1591 1590
 			/**
@@ -1593,14 +1592,14 @@  discard block
 block discarded – undo
1593 1592
 			 *
1594 1593
 			 * @since 1.0
1595 1594
 			 */
1596
-			do_action( 'give_after_terms' );
1595
+			do_action('give_after_terms');
1597 1596
 			?>
1598 1597
 		</div>
1599 1598
 		<div id="give_show_terms">
1600 1599
 			<a href="#" class="give_terms_links give_terms_links-<?php echo $form_id; ?>" role="button"
1601
-			   aria-controls="give_terms"><?php esc_html_e( 'Show Terms', 'give' ); ?></a>
1600
+			   aria-controls="give_terms"><?php esc_html_e('Show Terms', 'give'); ?></a>
1602 1601
 			<a href="#" class="give_terms_links give_terms_links-<?php echo $form_id; ?>" role="button"
1603
-			   aria-controls="give_terms" style="display:none;"><?php esc_html_e( 'Hide Terms', 'give' ); ?></a>
1602
+			   aria-controls="give_terms" style="display:none;"><?php esc_html_e('Hide Terms', 'give'); ?></a>
1604 1603
 		</div>
1605 1604
 
1606 1605
 		<input name="give_agree_to_terms" class="required" type="checkbox"
@@ -1611,7 +1610,7 @@  discard block
 block discarded – undo
1611 1610
 	<?php
1612 1611
 }
1613 1612
 
1614
-add_action( 'give_donation_form_after_cc_form', 'give_terms_agreement', 8888, 1 );
1613
+add_action('give_donation_form_after_cc_form', 'give_terms_agreement', 8888, 1);
1615 1614
 
1616 1615
 /**
1617 1616
  * Checkout Final Total.
@@ -1624,15 +1623,14 @@  discard block
 block discarded – undo
1624 1623
  *
1625 1624
  * @return void
1626 1625
  */
1627
-function give_checkout_final_total( $form_id ) {
1626
+function give_checkout_final_total($form_id) {
1628 1627
 
1629
-	$total = isset( $_POST['give_total'] ) ?
1630
-		apply_filters( 'give_donation_total', give_maybe_sanitize_amount( $_POST['give_total'] ) ) :
1631
-		give_get_default_form_amount( $form_id );
1628
+	$total = isset($_POST['give_total']) ?
1629
+		apply_filters('give_donation_total', give_maybe_sanitize_amount($_POST['give_total'])) : give_get_default_form_amount($form_id);
1632 1630
 
1633 1631
 
1634 1632
 	// Only proceed if give_total available.
1635
-	if ( empty( $total ) ) {
1633
+	if (empty($total)) {
1636 1634
 		return;
1637 1635
 	}
1638 1636
 	?>
@@ -1643,19 +1641,19 @@  discard block
 block discarded – undo
1643 1641
 		 *
1644 1642
 		 * @since 2.0.5
1645 1643
 		 */
1646
-		do_action( 'give_donation_final_total_label_before', $form_id );
1644
+		do_action('give_donation_final_total_label_before', $form_id);
1647 1645
 		?>
1648 1646
 		<span class="give-donation-total-label">
1649
-			<?php echo apply_filters( 'give_donation_total_label', esc_html__( 'Donation Total:', 'give' ) ); ?>
1647
+			<?php echo apply_filters('give_donation_total_label', esc_html__('Donation Total:', 'give')); ?>
1650 1648
 		</span>
1651 1649
 		<span class="give-final-total-amount"
1652
-			  data-total="<?php echo give_format_amount( $total, array( 'sanitize' => false ) ); ?>">
1650
+			  data-total="<?php echo give_format_amount($total, array('sanitize' => false)); ?>">
1653 1651
 			<?php
1654 1652
 
1655
-			echo give_currency_filter( give_format_amount( $total, array(
1653
+			echo give_currency_filter(give_format_amount($total, array(
1656 1654
 				'sanitize' => false,
1657
-				'currency' => give_get_currency( $form_id ),
1658
-			) ), array( 'currency_code' => give_get_currency( $form_id ) ) ); ?>
1655
+				'currency' => give_get_currency($form_id),
1656
+			)), array('currency_code' => give_get_currency($form_id))); ?>
1659 1657
 		</span>
1660 1658
 		<?php
1661 1659
 		/**
@@ -1663,13 +1661,13 @@  discard block
 block discarded – undo
1663 1661
 		 *
1664 1662
 		 * @since 2.0.5
1665 1663
 		 */
1666
-		do_action( 'give_donation_final_total_label_after', $form_id );
1664
+		do_action('give_donation_final_total_label_after', $form_id);
1667 1665
 		?>
1668 1666
 	</p>
1669 1667
 	<?php
1670 1668
 }
1671 1669
 
1672
-add_action( 'give_donation_form_before_submit', 'give_checkout_final_total', 999 );
1670
+add_action('give_donation_form_before_submit', 'give_checkout_final_total', 999);
1673 1671
 
1674 1672
 /**
1675 1673
  * Renders the Checkout Submit section.
@@ -1681,7 +1679,7 @@  discard block
 block discarded – undo
1681 1679
  *
1682 1680
  * @return void
1683 1681
  */
1684
-function give_checkout_submit( $form_id, $args ) {
1682
+function give_checkout_submit($form_id, $args) {
1685 1683
 	?>
1686 1684
 	<fieldset id="give_purchase_submit" class="give-donation-submit">
1687 1685
 		<?php
@@ -1690,24 +1688,24 @@  discard block
 block discarded – undo
1690 1688
 		 *
1691 1689
 		 * @since 1.7
1692 1690
 		 */
1693
-		do_action( 'give_donation_form_before_submit', $form_id, $args );
1691
+		do_action('give_donation_form_before_submit', $form_id, $args);
1694 1692
 
1695
-		give_checkout_hidden_fields( $form_id );
1693
+		give_checkout_hidden_fields($form_id);
1696 1694
 
1697
-		echo give_get_donation_form_submit_button( $form_id );
1695
+		echo give_get_donation_form_submit_button($form_id);
1698 1696
 
1699 1697
 		/**
1700 1698
 		 * Fire after donation form submit.
1701 1699
 		 *
1702 1700
 		 * @since 1.7
1703 1701
 		 */
1704
-		do_action( 'give_donation_form_after_submit', $form_id, $args );
1702
+		do_action('give_donation_form_after_submit', $form_id, $args);
1705 1703
 		?>
1706 1704
 	</fieldset>
1707 1705
 	<?php
1708 1706
 }
1709 1707
 
1710
-add_action( 'give_donation_form_after_cc_form', 'give_checkout_submit', 9999, 2 );
1708
+add_action('give_donation_form_after_cc_form', 'give_checkout_submit', 9999, 2);
1711 1709
 
1712 1710
 /**
1713 1711
  * Give Donation form submit button.
@@ -1718,10 +1716,10 @@  discard block
 block discarded – undo
1718 1716
  *
1719 1717
  * @return string
1720 1718
  */
1721
-function give_get_donation_form_submit_button( $form_id ) {
1719
+function give_get_donation_form_submit_button($form_id) {
1722 1720
 
1723
-	$display_label_field = give_get_meta( $form_id, '_give_checkout_label', true );
1724
-	$display_label       = ( ! empty( $display_label_field ) ? $display_label_field : esc_html__( 'Donate Now', 'give' ) );
1721
+	$display_label_field = give_get_meta($form_id, '_give_checkout_label', true);
1722
+	$display_label       = ( ! empty($display_label_field) ? $display_label_field : esc_html__('Donate Now', 'give'));
1725 1723
 	ob_start();
1726 1724
 	?>
1727 1725
 	<div class="give-submit-button-wrap give-clearfix">
@@ -1730,7 +1728,7 @@  discard block
 block discarded – undo
1730 1728
 		<span class="give-loading-animation"></span>
1731 1729
 	</div>
1732 1730
 	<?php
1733
-	return apply_filters( 'give_donation_form_submit_button', ob_get_clean(), $form_id );
1731
+	return apply_filters('give_donation_form_submit_button', ob_get_clean(), $form_id);
1734 1732
 }
1735 1733
 
1736 1734
 /**
@@ -1745,22 +1743,22 @@  discard block
 block discarded – undo
1745 1743
  *
1746 1744
  * @return mixed
1747 1745
  */
1748
-function give_show_goal_progress( $form_id, $args = array() ) {
1746
+function give_show_goal_progress($form_id, $args = array()) {
1749 1747
 
1750 1748
 	ob_start();
1751
-	give_get_template( 'shortcode-goal', array( 'form_id' => $form_id, 'args' => $args ) );
1749
+	give_get_template('shortcode-goal', array('form_id' => $form_id, 'args' => $args));
1752 1750
 
1753 1751
 	/**
1754 1752
 	 * Filter progress bar output
1755 1753
 	 *
1756 1754
 	 * @since 2.0
1757 1755
 	 */
1758
-	echo apply_filters( 'give_goal_output', ob_get_clean(), $form_id, $args );
1756
+	echo apply_filters('give_goal_output', ob_get_clean(), $form_id, $args);
1759 1757
 
1760 1758
 	return true;
1761 1759
 }
1762 1760
 
1763
-add_action( 'give_pre_form', 'give_show_goal_progress', 10, 2 );
1761
+add_action('give_pre_form', 'give_show_goal_progress', 10, 2);
1764 1762
 
1765 1763
 /**
1766 1764
  * Show Give Totals Progress.
@@ -1772,22 +1770,22 @@  discard block
 block discarded – undo
1772 1770
  *
1773 1771
  * @return mixed
1774 1772
  */
1775
-function give_show_goal_totals_progress( $total, $total_goal ) {
1773
+function give_show_goal_totals_progress($total, $total_goal) {
1776 1774
 
1777 1775
 	// Bail out if total goal is set as an array.
1778
-	if ( isset( $total_goal ) && is_array( $total_goal ) ) {
1776
+	if (isset($total_goal) && is_array($total_goal)) {
1779 1777
 		return false;
1780 1778
 	}
1781 1779
 
1782 1780
 	ob_start();
1783
-	give_get_template( 'shortcode-totals-progress', array( 'total' => $total, 'total_goal' => $total_goal ) );
1781
+	give_get_template('shortcode-totals-progress', array('total' => $total, 'total_goal' => $total_goal));
1784 1782
 
1785
-	echo apply_filters( 'give_total_progress_output', ob_get_clean() );
1783
+	echo apply_filters('give_total_progress_output', ob_get_clean());
1786 1784
 
1787 1785
 	return true;
1788 1786
 }
1789 1787
 
1790
-add_action( 'give_pre_form', 'give_show_goal_totals_progress', 10, 2 );
1788
+add_action('give_pre_form', 'give_show_goal_totals_progress', 10, 2);
1791 1789
 
1792 1790
 /**
1793 1791
  * Get form content position.
@@ -1799,10 +1797,10 @@  discard block
 block discarded – undo
1799 1797
  *
1800 1798
  * @return mixed|string
1801 1799
  */
1802
-function give_get_form_content_placement( $form_id, $args ) {
1800
+function give_get_form_content_placement($form_id, $args) {
1803 1801
 	$show_content = '';
1804 1802
 
1805
-	if ( isset( $args['show_content'] ) && ! empty( $args['show_content'] ) ) {
1803
+	if (isset($args['show_content']) && ! empty($args['show_content'])) {
1806 1804
 		// Content positions.
1807 1805
 		$content_placement = array(
1808 1806
 			'above' => 'give_pre_form',
@@ -1810,18 +1808,18 @@  discard block
 block discarded – undo
1810 1808
 		);
1811 1809
 
1812 1810
 		// Check if content position already decoded.
1813
-		if ( in_array( $args['show_content'], $content_placement ) ) {
1811
+		if (in_array($args['show_content'], $content_placement)) {
1814 1812
 			return $args['show_content'];
1815 1813
 		}
1816 1814
 
1817
-		$show_content = ( 'none' !== $args['show_content'] ? $content_placement[ $args['show_content'] ] : '' );
1815
+		$show_content = ('none' !== $args['show_content'] ? $content_placement[$args['show_content']] : '');
1818 1816
 
1819
-	} elseif ( give_is_setting_enabled( give_get_meta( $form_id, '_give_display_content', true ) ) ) {
1820
-		$show_content = give_get_meta( $form_id, '_give_content_placement', true );
1817
+	} elseif (give_is_setting_enabled(give_get_meta($form_id, '_give_display_content', true))) {
1818
+		$show_content = give_get_meta($form_id, '_give_content_placement', true);
1821 1819
 
1822
-	} elseif ( 'none' !== give_get_meta( $form_id, '_give_content_option', true ) ) {
1820
+	} elseif ('none' !== give_get_meta($form_id, '_give_content_option', true)) {
1823 1821
 		// Backward compatibility for _give_content_option for v18.
1824
-		$show_content = give_get_meta( $form_id, '_give_content_option', true );
1822
+		$show_content = give_get_meta($form_id, '_give_content_option', true);
1825 1823
 	}
1826 1824
 
1827 1825
 	return $show_content;
@@ -1837,20 +1835,20 @@  discard block
 block discarded – undo
1837 1835
  *
1838 1836
  * @return void|bool
1839 1837
  */
1840
-function give_form_content( $form_id, $args ) {
1838
+function give_form_content($form_id, $args) {
1841 1839
 
1842
-	$show_content = give_get_form_content_placement( $form_id, $args );
1840
+	$show_content = give_get_form_content_placement($form_id, $args);
1843 1841
 
1844 1842
 	// Bailout.
1845
-	if ( empty( $show_content ) ) {
1843
+	if (empty($show_content)) {
1846 1844
 		return false;
1847 1845
 	}
1848 1846
 
1849 1847
 	// Add action according to value.
1850
-	add_action( $show_content, 'give_form_display_content', 10, 2 );
1848
+	add_action($show_content, 'give_form_display_content', 10, 2);
1851 1849
 }
1852 1850
 
1853
-add_action( 'give_pre_form_output', 'give_form_content', 10, 2 );
1851
+add_action('give_pre_form_output', 'give_form_content', 10, 2);
1854 1852
 
1855 1853
 /**
1856 1854
  * Renders Post Form Content.
@@ -1864,14 +1862,14 @@  discard block
 block discarded – undo
1864 1862
  *
1865 1863
  * @return void
1866 1864
  */
1867
-function give_form_display_content( $form_id, $args ) {
1868
-	$content      = give_get_meta( $form_id, '_give_form_content', true );
1869
-	$show_content = give_get_form_content_placement( $form_id, $args );
1870
-
1871
-	if ( give_is_setting_enabled( give_get_option( 'the_content_filter' ) ) ) {
1872
-		$content = apply_filters( 'the_content', $content );
1873
-	} else{
1874
-		$content = wpautop( do_shortcode( $content ) );
1865
+function give_form_display_content($form_id, $args) {
1866
+	$content      = give_get_meta($form_id, '_give_form_content', true);
1867
+	$show_content = give_get_form_content_placement($form_id, $args);
1868
+
1869
+	if (give_is_setting_enabled(give_get_option('the_content_filter'))) {
1870
+		$content = apply_filters('the_content', $content);
1871
+	} else {
1872
+		$content = wpautop(do_shortcode($content));
1875 1873
 	}
1876 1874
 
1877 1875
 	$output = sprintf(
@@ -1890,11 +1888,11 @@  discard block
 block discarded – undo
1890 1888
 	 * @param int    $form_id
1891 1889
 	 * @param array  $args
1892 1890
 	 */
1893
-	echo apply_filters( 'give_form_content_output', $output, $form_id, $args );
1891
+	echo apply_filters('give_form_content_output', $output, $form_id, $args);
1894 1892
 
1895 1893
 	// remove action to prevent content output on addition forms on page.
1896 1894
 	// @see: https://github.com/WordImpress/Give/issues/634.
1897
-	remove_action( $show_content, 'give_form_display_content' );
1895
+	remove_action($show_content, 'give_form_display_content');
1898 1896
 }
1899 1897
 
1900 1898
 /**
@@ -1906,7 +1904,7 @@  discard block
 block discarded – undo
1906 1904
  *
1907 1905
  * @return void
1908 1906
  */
1909
-function give_checkout_hidden_fields( $form_id ) {
1907
+function give_checkout_hidden_fields($form_id) {
1910 1908
 
1911 1909
 	/**
1912 1910
 	 * Fires while rendering hidden checkout fields, before the fields.
@@ -1915,13 +1913,13 @@  discard block
 block discarded – undo
1915 1913
 	 *
1916 1914
 	 * @param int $form_id The form ID.
1917 1915
 	 */
1918
-	do_action( 'give_hidden_fields_before', $form_id );
1916
+	do_action('give_hidden_fields_before', $form_id);
1919 1917
 
1920
-	if ( is_user_logged_in() ) { ?>
1918
+	if (is_user_logged_in()) { ?>
1921 1919
 		<input type="hidden" name="give-user-id" value="<?php echo get_current_user_id(); ?>"/>
1922 1920
 	<?php } ?>
1923 1921
 	<input type="hidden" name="give_action" value="purchase"/>
1924
-	<input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway( $form_id ); ?>"/>
1922
+	<input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway($form_id); ?>"/>
1925 1923
 	<?php
1926 1924
 	/**
1927 1925
 	 * Fires while rendering hidden checkout fields, after the fields.
@@ -1930,7 +1928,7 @@  discard block
 block discarded – undo
1930 1928
 	 *
1931 1929
 	 * @param int $form_id The form ID.
1932 1930
 	 */
1933
-	do_action( 'give_hidden_fields_after', $form_id );
1931
+	do_action('give_hidden_fields_after', $form_id);
1934 1932
 
1935 1933
 }
1936 1934
 
@@ -1945,20 +1943,20 @@  discard block
 block discarded – undo
1945 1943
  *
1946 1944
  * @return string $content Filtered content.
1947 1945
  */
1948
-function give_filter_success_page_content( $content ) {
1946
+function give_filter_success_page_content($content) {
1949 1947
 
1950 1948
 	$give_options = give_get_settings();
1951 1949
 
1952
-	if ( isset( $give_options['success_page'] ) && isset( $_GET['payment-confirmation'] ) && is_page( $give_options['success_page'] ) ) {
1953
-		if ( has_filter( 'give_payment_confirm_' . $_GET['payment-confirmation'] ) ) {
1954
-			$content = apply_filters( 'give_payment_confirm_' . $_GET['payment-confirmation'], $content );
1950
+	if (isset($give_options['success_page']) && isset($_GET['payment-confirmation']) && is_page($give_options['success_page'])) {
1951
+		if (has_filter('give_payment_confirm_'.$_GET['payment-confirmation'])) {
1952
+			$content = apply_filters('give_payment_confirm_'.$_GET['payment-confirmation'], $content);
1955 1953
 		}
1956 1954
 	}
1957 1955
 
1958 1956
 	return $content;
1959 1957
 }
1960 1958
 
1961
-add_filter( 'the_content', 'give_filter_success_page_content' );
1959
+add_filter('the_content', 'give_filter_success_page_content');
1962 1960
 
1963 1961
 /**
1964 1962
  * Test Mode Frontend Warning.
@@ -1969,12 +1967,12 @@  discard block
 block discarded – undo
1969 1967
  */
1970 1968
 function give_test_mode_frontend_warning() {
1971 1969
 
1972
-	if ( give_is_test_mode() ) {
1973
-		echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>' . esc_html__( 'Notice:', 'give' ) . '</strong> ' . esc_html__( 'Test mode is enabled. While in test mode no live donations are processed.', 'give' ) . '</p></div>';
1970
+	if (give_is_test_mode()) {
1971
+		echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>'.esc_html__('Notice:', 'give').'</strong> '.esc_html__('Test mode is enabled. While in test mode no live donations are processed.', 'give').'</p></div>';
1974 1972
 	}
1975 1973
 }
1976 1974
 
1977
-add_action( 'give_pre_form', 'give_test_mode_frontend_warning', 10 );
1975
+add_action('give_pre_form', 'give_test_mode_frontend_warning', 10);
1978 1976
 
1979 1977
 /**
1980 1978
  * Members-only Form.
@@ -1988,21 +1986,21 @@  discard block
 block discarded – undo
1988 1986
  *
1989 1987
  * @return string
1990 1988
  */
1991
-function give_members_only_form( $final_output, $args ) {
1989
+function give_members_only_form($final_output, $args) {
1992 1990
 
1993
-	$form_id = isset( $args['form_id'] ) ? $args['form_id'] : 0;
1991
+	$form_id = isset($args['form_id']) ? $args['form_id'] : 0;
1994 1992
 
1995 1993
 	//Sanity Check: Must have form_id & not be logged in.
1996
-	if ( empty( $form_id ) || is_user_logged_in() ) {
1994
+	if (empty($form_id) || is_user_logged_in()) {
1997 1995
 		return $final_output;
1998 1996
 	}
1999 1997
 
2000 1998
 	//Logged in only and Register / Login set to none.
2001
-	if ( give_logged_in_only( $form_id ) && give_show_login_register_option( $form_id ) == 'none' ) {
1999
+	if (give_logged_in_only($form_id) && give_show_login_register_option($form_id) == 'none') {
2002 2000
 
2003
-		$final_output = Give()->notices->print_frontend_notice( esc_html__( 'Please log in in order to complete your donation.', 'give' ), false );
2001
+		$final_output = Give()->notices->print_frontend_notice(esc_html__('Please log in in order to complete your donation.', 'give'), false);
2004 2002
 
2005
-		return apply_filters( 'give_members_only_output', $final_output, $form_id );
2003
+		return apply_filters('give_members_only_output', $final_output, $form_id);
2006 2004
 
2007 2005
 	}
2008 2006
 
@@ -2010,7 +2008,7 @@  discard block
 block discarded – undo
2010 2008
 
2011 2009
 }
2012 2010
 
2013
-add_filter( 'give_donate_form', 'give_members_only_form', 10, 2 );
2011
+add_filter('give_donate_form', 'give_members_only_form', 10, 2);
2014 2012
 
2015 2013
 
2016 2014
 /**
@@ -2022,45 +2020,45 @@  discard block
 block discarded – undo
2022 2020
  * @param array            $args
2023 2021
  * @param Give_Donate_Form $form
2024 2022
  */
2025
-function __give_form_add_donation_hidden_field( $form_id, $args, $form ) {
2026
-	$id_prefix = ! empty( $args['id_prefix'] ) ? $args['id_prefix'] : '';
2023
+function __give_form_add_donation_hidden_field($form_id, $args, $form) {
2024
+	$id_prefix = ! empty($args['id_prefix']) ? $args['id_prefix'] : '';
2027 2025
 	?>
2028 2026
 	<input type="hidden" name="give-form-id-prefix" value="<?php echo $id_prefix; ?>"/>
2029
-	<input type="hidden" name="give-form-id" value="<?php echo intval( $form_id ); ?>"/>
2030
-	<input type="hidden" name="give-form-title" value="<?php echo esc_html( $form->post_title ); ?>"/>
2031
-	<input type="hidden" name="give-current-url" value="<?php echo esc_url( give_get_current_page_url() ); ?>"/>
2032
-	<input type="hidden" name="give-form-url" value="<?php echo esc_url( give_get_current_page_url() ); ?>"/>
2027
+	<input type="hidden" name="give-form-id" value="<?php echo intval($form_id); ?>"/>
2028
+	<input type="hidden" name="give-form-title" value="<?php echo esc_html($form->post_title); ?>"/>
2029
+	<input type="hidden" name="give-current-url" value="<?php echo esc_url(give_get_current_page_url()); ?>"/>
2030
+	<input type="hidden" name="give-form-url" value="<?php echo esc_url(give_get_current_page_url()); ?>"/>
2033 2031
 	<?php
2034 2032
 	// Get the custom option amount.
2035
-	$custom_amount = give_get_meta( $form_id, '_give_custom_amount', true );
2033
+	$custom_amount = give_get_meta($form_id, '_give_custom_amount', true);
2036 2034
 
2037 2035
 	// If custom amount enabled.
2038
-	if ( give_is_setting_enabled( $custom_amount ) ) {
2036
+	if (give_is_setting_enabled($custom_amount)) {
2039 2037
 		?>
2040 2038
 		<input type="hidden" name="give-form-minimum"
2041
-		       value="<?php echo give_maybe_sanitize_amount( give_get_form_minimum_price( $form_id ) ); ?>"/>
2039
+		       value="<?php echo give_maybe_sanitize_amount(give_get_form_minimum_price($form_id)); ?>"/>
2042 2040
 		<input type="hidden" name="give-form-maximum"
2043
-		       value="<?php echo give_maybe_sanitize_amount( give_get_form_maximum_price( $form_id ) ); ?>"/>
2041
+		       value="<?php echo give_maybe_sanitize_amount(give_get_form_maximum_price($form_id)); ?>"/>
2044 2042
 		<?php
2045 2043
 	}
2046 2044
 
2047 2045
 	// WP nonce field.
2048 2046
 	echo str_replace(
2049 2047
 		'/>',
2050
-		'data-time="' . time() . '" data-nonce-life="' . give_get_nonce_life() . '"/>',
2051
-		give_get_nonce_field( "give_donation_form_nonce_{$form_id}", 'give-form-hash', false )
2048
+		'data-time="'.time().'" data-nonce-life="'.give_get_nonce_life().'"/>',
2049
+		give_get_nonce_field("give_donation_form_nonce_{$form_id}", 'give-form-hash', false)
2052 2050
 	);
2053 2051
 
2054 2052
 	// Price ID hidden field for variable (multi-level) donation forms.
2055
-	if ( give_has_variable_prices( $form_id ) ) {
2053
+	if (give_has_variable_prices($form_id)) {
2056 2054
 
2057 2055
 		// Get default selected price ID.
2058
-		$prices   = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id );
2056
+		$prices   = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id);
2059 2057
 		$price_id = 0;
2060 2058
 
2061 2059
 		// Loop through prices.
2062
-		foreach ( $prices as $price ) {
2063
-			if ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) {
2060
+		foreach ($prices as $price) {
2061
+			if (isset($price['_give_default']) && $price['_give_default'] === 'default') {
2064 2062
 				$price_id = $price['_give_id']['level_id'];
2065 2063
 			};
2066 2064
 		}
@@ -2073,7 +2071,7 @@  discard block
 block discarded – undo
2073 2071
 	}
2074 2072
 }
2075 2073
 
2076
-add_action( 'give_donation_form_top', '__give_form_add_donation_hidden_field', 0, 3 );
2074
+add_action('give_donation_form_top', '__give_form_add_donation_hidden_field', 0, 3);
2077 2075
 
2078 2076
 /**
2079 2077
  * Add currency settings on donation form.
@@ -2085,20 +2083,20 @@  discard block
 block discarded – undo
2085 2083
  *
2086 2084
  * @return array
2087 2085
  */
2088
-function __give_form_add_currency_settings( $form_html_tags, $form ) {
2089
-	$form_currency     = give_get_currency( $form->ID );
2090
-	$currency_settings = give_get_currency_formatting_settings( $form_currency );
2086
+function __give_form_add_currency_settings($form_html_tags, $form) {
2087
+	$form_currency     = give_get_currency($form->ID);
2088
+	$currency_settings = give_get_currency_formatting_settings($form_currency);
2091 2089
 
2092 2090
 	// Check if currency exist.
2093
-	if ( empty( $currency_settings ) ) {
2091
+	if (empty($currency_settings)) {
2094 2092
 		return $form_html_tags;
2095 2093
 	}
2096 2094
 
2097
-	$form_html_tags['data-currency_symbol'] = give_currency_symbol( $form_currency );
2095
+	$form_html_tags['data-currency_symbol'] = give_currency_symbol($form_currency);
2098 2096
 	$form_html_tags['data-currency_code']   = $form_currency;
2099 2097
 
2100
-	if ( ! empty( $currency_settings ) ) {
2101
-		foreach ( $currency_settings as $key => $value ) {
2098
+	if ( ! empty($currency_settings)) {
2099
+		foreach ($currency_settings as $key => $value) {
2102 2100
 			$form_html_tags["data-{$key}"] = $value;
2103 2101
 		}
2104 2102
 	}
@@ -2106,7 +2104,7 @@  discard block
 block discarded – undo
2106 2104
 	return $form_html_tags;
2107 2105
 }
2108 2106
 
2109
-add_filter( 'give_form_html_tags', '__give_form_add_currency_settings', 0, 2 );
2107
+add_filter('give_form_html_tags', '__give_form_add_currency_settings', 0, 2);
2110 2108
 
2111 2109
 /**
2112 2110
  * Adds classes to progress bar container.
@@ -2117,7 +2115,7 @@  discard block
 block discarded – undo
2117 2115
  *
2118 2116
  * @return string
2119 2117
  */
2120
-function add_give_goal_progress_class( $class_goal ) {
2118
+function add_give_goal_progress_class($class_goal) {
2121 2119
 	$class_goal = 'progress progress-striped active';
2122 2120
 
2123 2121
 	return $class_goal;
@@ -2132,7 +2130,7 @@  discard block
 block discarded – undo
2132 2130
  *
2133 2131
  * @return string
2134 2132
  */
2135
-function add_give_goal_progress_bar_class( $class_bar ) {
2133
+function add_give_goal_progress_bar_class($class_bar) {
2136 2134
 	$class_bar = 'bar';
2137 2135
 
2138 2136
 	return $class_bar;
@@ -2149,12 +2147,12 @@  discard block
 block discarded – undo
2149 2147
  *
2150 2148
  * @return array
2151 2149
  */
2152
-function add_class_for_form_grid( $class, $id, $args ) {
2150
+function add_class_for_form_grid($class, $id, $args) {
2153 2151
 	$class[] = 'give-form-grid-wrap';
2154 2152
 
2155
-	foreach ( $class as $index => $item ) {
2156
-		if( false !== strpos( $item, 'give-display-' ) ) {
2157
-			unset( $class[$index] );
2153
+	foreach ($class as $index => $item) {
2154
+		if (false !== strpos($item, 'give-display-')) {
2155
+			unset($class[$index]);
2158 2156
 		}
2159 2157
 	}
2160 2158
 
@@ -2170,7 +2168,7 @@  discard block
 block discarded – undo
2170 2168
  *
2171 2169
  * @since 2.1
2172 2170
  */
2173
-function give_is_form_grid_page_hidden_field( $id, $args, $form ) {
2171
+function give_is_form_grid_page_hidden_field($id, $args, $form) {
2174 2172
 	echo '<input type="hidden" name="is-form-grid" value="true" />';
2175 2173
 }
2176 2174
 
@@ -2185,28 +2183,28 @@  discard block
 block discarded – undo
2185 2183
  * @since 2.1
2186 2184
  * @return string
2187 2185
  */
2188
-function give_redirect_and_popup_form( $redirect, $args ) {
2186
+function give_redirect_and_popup_form($redirect, $args) {
2189 2187
 
2190 2188
 	// Check the page has Form Grid.
2191
-	$is_form_grid = isset( $_POST['is-form-grid'] ) ? give_clean( $_POST['is-form-grid'] ) : '';
2189
+	$is_form_grid = isset($_POST['is-form-grid']) ? give_clean($_POST['is-form-grid']) : '';
2192 2190
 
2193
-	if ( 'true' === $is_form_grid ) {
2191
+	if ('true' === $is_form_grid) {
2194 2192
 
2195
-		$payment_mode = give_clean( $_POST['payment-mode'] );
2193
+		$payment_mode = give_clean($_POST['payment-mode']);
2196 2194
 		$form_id = $args['form-id'];
2197 2195
 
2198 2196
 		// Get the URL without Query parameters.
2199
-		$redirect = strtok( $redirect, '?' );
2197
+		$redirect = strtok($redirect, '?');
2200 2198
 
2201 2199
 		// Add query parameters 'form-id' and 'payment-mode'.
2202
-		$redirect = add_query_arg( array(
2200
+		$redirect = add_query_arg(array(
2203 2201
 			'form-id'      => $form_id,
2204 2202
 			'payment-mode' => $payment_mode,
2205
-		), $redirect );
2203
+		), $redirect);
2206 2204
 	}
2207 2205
 
2208 2206
 	// Return the modified URL.
2209 2207
 	return $redirect;
2210 2208
 }
2211 2209
 
2212
-add_filter( 'give_send_back_to_checkout', 'give_redirect_and_popup_form', 10, 2 );
2210
+add_filter('give_send_back_to_checkout', 'give_redirect_and_popup_form', 10, 2);
Please login to merge, or discard this patch.
includes/gateways/manual.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  * @since 1.0
21 21
  * @return void
22 22
  */
23
-add_action( 'give_manual_cc_form', '__return_false' );
23
+add_action('give_manual_cc_form', '__return_false');
24 24
 
25 25
 /**
26 26
  * Processes the donation data and uses the Manual Payment gateway to record
@@ -32,44 +32,44 @@  discard block
 block discarded – undo
32 32
  *
33 33
  * @return void
34 34
  */
35
-function give_manual_payment( $purchase_data ) {
35
+function give_manual_payment($purchase_data) {
36 36
 
37
-	if ( ! wp_verify_nonce( $purchase_data['gateway_nonce'], 'give-gateway' ) ) {
38
-		wp_die( esc_html__( 'Nonce verification failed.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) );
37
+	if ( ! wp_verify_nonce($purchase_data['gateway_nonce'], 'give-gateway')) {
38
+		wp_die(esc_html__('Nonce verification failed.', 'give'), esc_html__('Error', 'give'), array('response' => 403));
39 39
 	}
40 40
 
41 41
 	//Create payment_data array
42 42
 	$payment_data = array(
43 43
 		'price'           => $purchase_data['price'],
44 44
 		'give_form_title' => $purchase_data['post_data']['give-form-title'],
45
-		'give_form_id'    => intval( $purchase_data['post_data']['give-form-id'] ),
45
+		'give_form_id'    => intval($purchase_data['post_data']['give-form-id']),
46 46
 		'give_price_id'   => isset($purchase_data['post_data']['give-price-id']) ? $purchase_data['post_data']['give-price-id'] : '',
47 47
 		'date'            => $purchase_data['date'],
48 48
 		'user_email'      => $purchase_data['user_email'],
49 49
 		'purchase_key'    => $purchase_data['purchase_key'],
50
-		'currency'        => give_get_currency( $purchase_data['post_data']['give-form-id'], $purchase_data ),
50
+		'currency'        => give_get_currency($purchase_data['post_data']['give-form-id'], $purchase_data),
51 51
 		'user_info'       => $purchase_data['user_info'],
52 52
 		'status'          => 'pending'
53 53
 	);
54 54
 	// Record the pending payment
55
-	$payment = give_insert_payment( $payment_data );
55
+	$payment = give_insert_payment($payment_data);
56 56
 
57
-	if ( $payment ) {
58
-		give_update_payment_status( $payment, 'publish' );
57
+	if ($payment) {
58
+		give_update_payment_status($payment, 'publish');
59 59
 		give_send_to_success_page();
60 60
 	} else {
61 61
 		give_record_gateway_error(
62
-			esc_html__( 'Payment Error', 'give' ),
62
+			esc_html__('Payment Error', 'give'),
63 63
 			sprintf(
64 64
 				/* translators: %s: payment data */
65
-				esc_html__( 'The payment creation failed while processing a manual (free or test) donation. Payment data: %s', 'give' ),
66
-				json_encode( $payment_data )
65
+				esc_html__('The payment creation failed while processing a manual (free or test) donation. Payment data: %s', 'give'),
66
+				json_encode($payment_data)
67 67
 			),
68 68
 			$payment
69 69
 		);
70 70
 		// If errors are present, send the user back to the donation page so they can be corrected
71
-		give_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['give-gateway'] );
71
+		give_send_back_to_checkout('?payment-mode='.$purchase_data['post_data']['give-gateway']);
72 72
 	}
73 73
 }
74 74
 
75
-add_action( 'give_gateway_manual', 'give_manual_payment' );
75
+add_action('give_gateway_manual', 'give_manual_payment');
Please login to merge, or discard this patch.
includes/admin/donors/class-donor-table.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -258,7 +258,7 @@
 block discarded – undo
258 258
 	 * @access public
259 259
 	 * @since  1.0
260 260
 	 *
261
-	 * @return mixed string If search is present, false otherwise.
261
+	 * @return string|false string If search is present, false otherwise.
262 262
 	 */
263 263
 	public function get_search() {
264 264
 		return ! empty( $_GET['s'] ) ? urldecode( trim( $_GET['s'] ) ) : false;
Please login to merge, or discard this patch.
Spacing   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly.
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
19 19
 // Load WP_List_Table if not loaded.
20
-if ( ! class_exists( 'WP_List_Table' ) ) {
21
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
20
+if ( ! class_exists('WP_List_Table')) {
21
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
22 22
 }
23 23
 
24 24
 /**
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
 	public function __construct() {
62 62
 
63 63
 		// Set parent defaults.
64
-		parent::__construct( array(
65
-			'singular' => __( 'Donor', 'give' ), // Singular name of the listed records.
66
-			'plural'   => __( 'Donors', 'give' ), // Plural name of the listed records.
64
+		parent::__construct(array(
65
+			'singular' => __('Donor', 'give'), // Singular name of the listed records.
66
+			'plural'   => __('Donors', 'give'), // Plural name of the listed records.
67 67
 			'ajax'     => false, // Does this table support ajax?.
68
-		) );
68
+		));
69 69
 
70 70
 	}
71 71
 
@@ -80,23 +80,23 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @return void
82 82
 	 */
83
-	public function search_box( $text, $input_id ) {
84
-		$input_id = $input_id . '-search-input';
83
+	public function search_box($text, $input_id) {
84
+		$input_id = $input_id.'-search-input';
85 85
 
86
-		if ( ! empty( $_REQUEST['orderby'] ) ) {
87
-			echo sprintf( '<input type="hidden" name="orderby" value="%1$s" />', esc_attr( $_REQUEST['orderby'] ) );
86
+		if ( ! empty($_REQUEST['orderby'])) {
87
+			echo sprintf('<input type="hidden" name="orderby" value="%1$s" />', esc_attr($_REQUEST['orderby']));
88 88
 		}
89 89
 
90
-		if ( ! empty( $_REQUEST['order'] ) ) {
91
-			echo sprintf( '<input type="hidden" name="order" value="%1$s" />', esc_attr( $_REQUEST['order'] ) );
90
+		if ( ! empty($_REQUEST['order'])) {
91
+			echo sprintf('<input type="hidden" name="order" value="%1$s" />', esc_attr($_REQUEST['order']));
92 92
 		}
93 93
 		?>
94 94
 		<p class="search-box" role="search">
95 95
 			<label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
96 96
 			<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>"/>
97
-			<?php submit_button( $text, 'button', false, false, array(
97
+			<?php submit_button($text, 'button', false, false, array(
98 98
 				'ID' => 'search-submit',
99
-			) ); ?>
99
+			)); ?>
100 100
 		</p>
101 101
 		<?php
102 102
 	}
@@ -112,32 +112,32 @@  discard block
 block discarded – undo
112 112
 	 *
113 113
 	 * @return string Column Name.
114 114
 	 */
115
-	public function column_default( $donor, $column_name ) {
115
+	public function column_default($donor, $column_name) {
116 116
 
117
-		switch ( $column_name ) {
117
+		switch ($column_name) {
118 118
 
119 119
 			case 'num_donations' :
120 120
 				$value = sprintf(
121 121
 					'<a href="%s">%s</a>',
122
-					admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&donor=' . absint( $donor['id'] ) ),
123
-					esc_html( $donor['num_donations'] )
122
+					admin_url('edit.php?post_type=give_forms&page=give-payment-history&donor='.absint($donor['id'])),
123
+					esc_html($donor['num_donations'])
124 124
 				);
125 125
 				break;
126 126
 
127 127
 			case 'amount_spent' :
128
-				$value = give_currency_filter( give_format_amount( $donor[ $column_name ], array( 'sanitize' => false ) ) );
128
+				$value = give_currency_filter(give_format_amount($donor[$column_name], array('sanitize' => false)));
129 129
 				break;
130 130
 
131 131
 			case 'date_created' :
132
-				$value = date_i18n( give_date_format(), strtotime( $donor['date_created'] ) );
132
+				$value = date_i18n(give_date_format(), strtotime($donor['date_created']));
133 133
 				break;
134 134
 
135 135
 			default:
136
-				$value = isset( $donor[ $column_name ] ) ? $donor[ $column_name ] : null;
136
+				$value = isset($donor[$column_name]) ? $donor[$column_name] : null;
137 137
 				break;
138 138
 		}
139 139
 
140
-		return apply_filters( "give_donors_column_{$column_name}", $value, $donor['id'] );
140
+		return apply_filters("give_donors_column_{$column_name}", $value, $donor['id']);
141 141
 
142 142
 	}
143 143
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 *
152 152
 	 * @return string
153 153
 	 */
154
-	public function column_cb( $donor ){
154
+	public function column_cb($donor) {
155 155
 		return sprintf(
156 156
 			'<input class="donor-selector" type="checkbox" name="%1$s[]" value="%2$d" data-name="%3$s" />',
157 157
 			$this->_args['singular'],
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 	 *
171 171
 	 * @return string
172 172
 	 */
173
-	public function column_name( $donor ) {
174
-		$name     = ! empty( $donor['name'] ) ? $donor['name'] : '<em>' . __( 'Unnamed Donor', 'give' ) . '</em>';
175
-		$view_url = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor['id'] );
176
-		$actions  = $this->get_row_actions( $donor );
173
+	public function column_name($donor) {
174
+		$name     = ! empty($donor['name']) ? $donor['name'] : '<em>'.__('Unnamed Donor', 'give').'</em>';
175
+		$view_url = admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor['id']);
176
+		$actions  = $this->get_row_actions($donor);
177 177
 
178
-		return '<a href="' . esc_url( $view_url ) . '">' . $name . '</a>' . $this->row_actions( $actions );
178
+		return '<a href="'.esc_url($view_url).'">'.$name.'</a>'.$this->row_actions($actions);
179 179
 	}
180 180
 
181 181
 	/**
@@ -189,14 +189,14 @@  discard block
 block discarded – undo
189 189
 	public function get_columns() {
190 190
 		$columns = array(
191 191
 			'cb'            => '<input type="checkbox" />', // Render a checkbox instead of text.
192
-			'name'          => __( 'Name', 'give' ),
193
-			'email'         => __( 'Email', 'give' ),
194
-			'num_donations' => __( 'Donations', 'give' ),
195
-			'amount_spent'  => __( 'Total Donated', 'give' ),
196
-			'date_created'  => __( 'Date Created', 'give' ),
192
+			'name'          => __('Name', 'give'),
193
+			'email'         => __('Email', 'give'),
194
+			'num_donations' => __('Donations', 'give'),
195
+			'amount_spent'  => __('Total Donated', 'give'),
196
+			'date_created'  => __('Date Created', 'give'),
197 197
 		);
198 198
 
199
-		return apply_filters( 'give_list_donors_columns', $columns );
199
+		return apply_filters('give_list_donors_columns', $columns);
200 200
 
201 201
 	}
202 202
 
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 	public function get_sortable_columns() {
211 211
 
212 212
 		$columns = array(
213
-			'date_created'  => array( 'date_created', true ),
214
-			'name'          => array( 'name', true ),
215
-			'num_donations' => array( 'purchase_count', false ),
216
-			'amount_spent'  => array( 'purchase_value', false ),
213
+			'date_created'  => array('date_created', true),
214
+			'name'          => array('name', true),
215
+			'num_donations' => array('purchase_count', false),
216
+			'amount_spent'  => array('purchase_value', false),
217 217
 		);
218 218
 
219
-		return apply_filters( 'give_list_donors_sortable_columns', $columns );
219
+		return apply_filters('give_list_donors_sortable_columns', $columns);
220 220
 	}
221 221
 
222 222
 	/**
@@ -229,15 +229,15 @@  discard block
 block discarded – undo
229 229
 	 *
230 230
 	 * @return array An array of action links.
231 231
 	 */
232
-	public function get_row_actions( $donor ) {
232
+	public function get_row_actions($donor) {
233 233
 
234 234
 		$actions = array(
235
-			'view'   => sprintf( '<a href="%1$s" aria-label="%2$s">%3$s</a>', admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor['id'] ), sprintf( esc_attr__( 'View "%s"', 'give' ), $donor['name'] ), __( 'View Donor', 'give' ) ),
236
-			'notes'  => sprintf( '<a href="%1$s" aria-label="%2$s">%3$s</a>', admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=notes&id=' . $donor['id'] ), sprintf( esc_attr__( 'Notes for "%s"', 'give' ), $donor['name'] ), __( 'Notes', 'give' ) ),
237
-			'delete' => sprintf( '<a class="%1$s" data-id="%2$s" href="#" aria-label="%3$s">%4$s</a>', 'give-single-donor-delete', $donor['id'],sprintf( esc_attr__( 'Delete "%s"', 'give' ), $donor['name'] ), __( 'Delete', 'give' ) ),
235
+			'view'   => sprintf('<a href="%1$s" aria-label="%2$s">%3$s</a>', admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor['id']), sprintf(esc_attr__('View "%s"', 'give'), $donor['name']), __('View Donor', 'give')),
236
+			'notes'  => sprintf('<a href="%1$s" aria-label="%2$s">%3$s</a>', admin_url('edit.php?post_type=give_forms&page=give-donors&view=notes&id='.$donor['id']), sprintf(esc_attr__('Notes for "%s"', 'give'), $donor['name']), __('Notes', 'give')),
237
+			'delete' => sprintf('<a class="%1$s" data-id="%2$s" href="#" aria-label="%3$s">%4$s</a>', 'give-single-donor-delete', $donor['id'], sprintf(esc_attr__('Delete "%s"', 'give'), $donor['name']), __('Delete', 'give')),
238 238
 		);
239 239
 
240
-		return apply_filters( 'give_donor_row_actions', $actions, $donor );
240
+		return apply_filters('give_donor_row_actions', $actions, $donor);
241 241
 
242 242
 	}
243 243
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	 * @return int Current page number.
251 251
 	 */
252 252
 	public function get_paged() {
253
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
253
+		return isset($_GET['paged']) ? absint($_GET['paged']) : 1;
254 254
 	}
255 255
 
256 256
 	/**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @return mixed string If search is present, false otherwise.
263 263
 	 */
264 264
 	public function get_search() {
265
-		return ! empty( $_GET['s'] ) ? urldecode( trim( $_GET['s'] ) ) : false;
265
+		return ! empty($_GET['s']) ? urldecode(trim($_GET['s'])) : false;
266 266
 	}
267 267
 
268 268
 	/**
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 	 */
276 276
 	public function get_bulk_actions() {
277 277
 		$actions = array(
278
-			'delete' => __( 'Delete', 'give' ),
278
+			'delete' => __('Delete', 'give'),
279 279
 		);
280 280
 		return $actions;
281 281
 	}
@@ -288,19 +288,19 @@  discard block
 block discarded – undo
288 288
 	 * @access protected
289 289
 	 * @since  1.8.16
290 290
 	 */
291
-	protected function display_tablenav( $which ) {
292
-		if ( 'top' === $which ) {
293
-			wp_nonce_field( 'bulk-' . $this->_args['plural'], '_wpnonce', false );
291
+	protected function display_tablenav($which) {
292
+		if ('top' === $which) {
293
+			wp_nonce_field('bulk-'.$this->_args['plural'], '_wpnonce', false);
294 294
 		}
295 295
 		?>
296
-		<div class="tablenav <?php echo esc_attr( $which ); ?>">
297
-			<?php if ( $this->has_items() ): ?>
296
+		<div class="tablenav <?php echo esc_attr($which); ?>">
297
+			<?php if ($this->has_items()): ?>
298 298
 				<div class="alignleft actions bulkactions">
299
-					<?php $this->bulk_actions( $which ); ?>
299
+					<?php $this->bulk_actions($which); ?>
300 300
 				</div>
301 301
 			<?php endif;
302
-			$this->extra_tablenav( $which );
303
-			$this->pagination( $which );
302
+			$this->extra_tablenav($which);
303
+			$this->pagination($which);
304 304
 			?>
305 305
 			<br class="clear" />
306 306
 		</div>
@@ -321,13 +321,13 @@  discard block
 block discarded – undo
321 321
 
322 322
 		// Get donor query.
323 323
 		$args   = $this->get_donor_query();
324
-		$donors = Give()->donors->get_donors( $args );
324
+		$donors = Give()->donors->get_donors($args);
325 325
 
326
-		if ( $donors ) {
326
+		if ($donors) {
327 327
 
328
-			foreach ( $donors as $donor ) {
328
+			foreach ($donors as $donor) {
329 329
 
330
-				$user_id = ! empty( $donor->user_id ) ? intval( $donor->user_id ) : 0;
330
+				$user_id = ! empty($donor->user_id) ? intval($donor->user_id) : 0;
331 331
 
332 332
 				$data[] = array(
333 333
 					'id'            => $donor->id,
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 			}
342 342
 		}
343 343
 
344
-		return apply_filters( 'give_donors_column_query_data', $data );
344
+		return apply_filters('give_donors_column_query_data', $data);
345 345
 	}
346 346
 
347 347
 	/**
@@ -356,9 +356,9 @@  discard block
 block discarded – undo
356 356
 
357 357
 		$_donor_query['number'] = - 1;
358 358
 		$_donor_query['offset'] = 0;
359
-		$donors                 = Give()->donors->get_donors( $_donor_query );
359
+		$donors                 = Give()->donors->get_donors($_donor_query);
360 360
 
361
-		return count( $donors );
361
+		return count($donors);
362 362
 	}
363 363
 
364 364
 	/**
@@ -371,10 +371,10 @@  discard block
 block discarded – undo
371 371
 	 */
372 372
 	public function get_donor_query() {
373 373
 		$paged   = $this->get_paged();
374
-		$offset  = $this->per_page * ( $paged - 1 );
374
+		$offset  = $this->per_page * ($paged - 1);
375 375
 		$search  = $this->get_search();
376
-		$order   = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 'DESC';
377
-		$orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'id';
376
+		$order   = isset($_GET['order']) ? sanitize_text_field($_GET['order']) : 'DESC';
377
+		$orderby = isset($_GET['orderby']) ? sanitize_text_field($_GET['orderby']) : 'id';
378 378
 
379 379
 		$args = array(
380 380
 			'number'  => $this->per_page,
@@ -383,10 +383,10 @@  discard block
 block discarded – undo
383 383
 			'orderby' => $orderby,
384 384
 		);
385 385
 
386
-		if ( $search ) {
387
-			if ( is_email( $search ) ) {
386
+		if ($search) {
387
+			if (is_email($search)) {
388 388
 				$args['email'] = $search;
389
-			} elseif ( is_numeric( $search ) ) {
389
+			} elseif (is_numeric($search)) {
390 390
 				$args['id'] = $search;
391 391
 			} else {
392 392
 				$args['name'] = $search;
@@ -404,9 +404,9 @@  discard block
 block discarded – undo
404 404
 	 * @since  1.8.17
405 405
 	 * @access public
406 406
 	 */
407
-	public function single_row( $item ) {
408
-		echo sprintf( '<tr id="donor-%1$d" data-id="%2$d" data-name="%3$s">', $item['id'], $item['id'], $item['name'] );
409
-		$this->single_row_columns( $item );
407
+	public function single_row($item) {
408
+		echo sprintf('<tr id="donor-%1$d" data-id="%2$d" data-name="%3$s">', $item['id'], $item['id'], $item['name']);
409
+		$this->single_row_columns($item);
410 410
 		echo '</tr>';
411 411
 	}
412 412
 
@@ -419,11 +419,11 @@  discard block
 block discarded – undo
419 419
 	public function display() {
420 420
 		$singular = $this->_args['singular'];
421 421
 
422
-		$this->display_tablenav( 'top' );
422
+		$this->display_tablenav('top');
423 423
 
424
-		$this->screen->render_screen_reader_content( 'heading_list' );
424
+		$this->screen->render_screen_reader_content('heading_list');
425 425
 		?>
426
-		<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
426
+		<table class="wp-list-table <?php echo implode(' ', $this->get_table_classes()); ?>">
427 427
 			<thead>
428 428
 			<tr>
429 429
 				<?php $this->print_column_headers(); ?>
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 			</thead>
432 432
 
433 433
 			<tbody id="the-list"<?php
434
-			if ( $singular ) {
434
+			if ($singular) {
435 435
 				echo " data-wp-lists='list:$singular'";
436 436
 			} ?>>
437 437
 			<tr class="hidden"></tr>
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 				<td colspan="6" class="colspanchange">
440 440
 
441 441
 					<fieldset class="inline-edit-col-left">
442
-						<legend class="inline-edit-legend"><?php _e( 'BULK DELETE', 'give' ); ?></legend>
442
+						<legend class="inline-edit-legend"><?php _e('BULK DELETE', 'give'); ?></legend>
443 443
 						<div class="inline-edit-col">
444 444
 							<div id="bulk-titles">
445 445
 								<div id="give-bulk-donors" class="give-bulk-donors">
@@ -452,22 +452,22 @@  discard block
 block discarded – undo
452 452
 						<div class="inline-edit-col">
453 453
 							<label>
454 454
 								<input id="give-delete-donor-confirm" type="checkbox" name="give-delete-donor-confirm"/>
455
-								<?php _e( 'Are you sure you want to delete the selected donor(s)?', 'give' ); ?>
455
+								<?php _e('Are you sure you want to delete the selected donor(s)?', 'give'); ?>
456 456
 							</label>
457 457
 							<label>
458 458
 								<input id="give-delete-donor-records" type="checkbox" name="give-delete-donor-records"/>
459
-								<?php _e( 'Delete all associated donations and records?', 'give' ); ?>
459
+								<?php _e('Delete all associated donations and records?', 'give'); ?>
460 460
 							</label>
461 461
 						</div>
462 462
 					</fieldset>
463 463
 
464 464
 					<p class="submit inline-edit-save">
465 465
 						<input type="hidden" name="give_action" value="delete_donor"/>
466
-						<input type="hidden" name="s" value="<?php echo ( ! empty( $_GET['s'] ) ) ? $_GET['s'] : ''; ?>"/>
467
-						<input type="hidden" name="orderby" value="<?php echo ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'id'; ?>"/>
468
-						<input type="hidden" name="order" value="<?php echo ( ! empty( $_GET['order'] ) ) ? $_GET['order'] : 'desc'; ?>"/>
469
-						<button type="button" id="give-bulk-delete-cancel" class="button cancel alignleft"><?php _e( 'Cancel', 'give' ); ?></button>
470
-						<input type="submit" id="give-bulk-delete-button" disabled class="button button-primary alignright" value="<?php _e( 'Delete', 'give' ); ?>">
466
+						<input type="hidden" name="s" value="<?php echo ( ! empty($_GET['s'])) ? $_GET['s'] : ''; ?>"/>
467
+						<input type="hidden" name="orderby" value="<?php echo ( ! empty($_GET['orderby'])) ? $_GET['orderby'] : 'id'; ?>"/>
468
+						<input type="hidden" name="order" value="<?php echo ( ! empty($_GET['order'])) ? $_GET['order'] : 'desc'; ?>"/>
469
+						<button type="button" id="give-bulk-delete-cancel" class="button cancel alignleft"><?php _e('Cancel', 'give'); ?></button>
470
+						<input type="submit" id="give-bulk-delete-button" disabled class="button button-primary alignright" value="<?php _e('Delete', 'give'); ?>">
471 471
 						<br class="clear">
472 472
 					</p>
473 473
 				</td>
@@ -477,13 +477,13 @@  discard block
 block discarded – undo
477 477
 
478 478
 			<tfoot>
479 479
 			<tr>
480
-				<?php $this->print_column_headers( false ); ?>
480
+				<?php $this->print_column_headers(false); ?>
481 481
 			</tr>
482 482
 			</tfoot>
483 483
 
484 484
 		</table>
485 485
 		<?php
486
-		$this->display_tablenav( 'bottom' );
486
+		$this->display_tablenav('bottom');
487 487
 	}
488 488
 
489 489
 	/**
@@ -500,16 +500,16 @@  discard block
 block discarded – undo
500 500
 		$hidden   = array(); // No hidden columns.
501 501
 		$sortable = $this->get_sortable_columns();
502 502
 
503
-		$this->_column_headers = array( $columns, $hidden, $sortable );
503
+		$this->_column_headers = array($columns, $hidden, $sortable);
504 504
 
505 505
 		$this->items = $this->donor_data();
506 506
 
507 507
 		$this->total = $this->get_donor_count();
508 508
 
509
-		$this->set_pagination_args( array(
509
+		$this->set_pagination_args(array(
510 510
 			'total_items' => $this->total,
511 511
 			'per_page'    => $this->per_page,
512
-			'total_pages' => ceil( $this->total / $this->per_page ),
513
-		) );
512
+			'total_pages' => ceil($this->total / $this->per_page),
513
+		));
514 514
 	}
515 515
 }
Please login to merge, or discard this patch.
includes/admin/donors/donor-actions.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @since 1.0
23 23
  *
24
- * @return array|bool $output Response messages
24
+ * @return false|null $output Response messages
25 25
  */
26 26
 function give_edit_donor( $args ) {
27 27
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
  *
228 228
  * @since 1.0
229 229
  *
230
- * @return int Whether it was a successful deletion.
230
+ * @return false|null Whether it was a successful deletion.
231 231
  */
232 232
 function give_donor_delete( $args ) {
233 233
 
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
  *
522 522
  * @since  1.7
523 523
  *
524
- * @return bool|null
524
+ * @return false|null
525 525
  */
526 526
 function give_remove_donor_email() {
527 527
 	if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) {
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
  *
566 566
  * @since  1.7
567 567
  *
568
- * @return bool|null
568
+ * @return false|null
569 569
  */
570 570
 function give_set_donor_primary_email() {
571 571
 	if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) {
Please login to merge, or discard this patch.
Spacing   +204 added lines, -204 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -23,33 +23,33 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @return array|bool $output Response messages
25 25
  */
26
-function give_edit_donor( $args ) {
26
+function give_edit_donor($args) {
27 27
 
28
-	$donor_edit_role = apply_filters( 'give_edit_donors_role', 'edit_give_payments' );
28
+	$donor_edit_role = apply_filters('give_edit_donors_role', 'edit_give_payments');
29 29
 
30
-	if ( ! is_admin() || ! current_user_can( $donor_edit_role ) ) {
31
-		wp_die( __( 'You do not have permission to edit this donor.', 'give' ), __( 'Error', 'give' ), array(
30
+	if ( ! is_admin() || ! current_user_can($donor_edit_role)) {
31
+		wp_die(__('You do not have permission to edit this donor.', 'give'), __('Error', 'give'), array(
32 32
 			'response' => 403,
33
-		) );
33
+		));
34 34
 	}
35 35
 
36
-	if ( empty( $args ) ) {
36
+	if (empty($args)) {
37 37
 		return false;
38 38
 	}
39 39
 
40
-	$donor_info = give_clean( $args['customerinfo'] );
40
+	$donor_info = give_clean($args['customerinfo']);
41 41
 	$donor_id   = (int) $args['customerinfo']['id'];
42 42
 	$nonce      = $args['_wpnonce'];
43 43
 
44
-	if ( ! wp_verify_nonce( $nonce, 'edit-donor' ) ) {
45
-		wp_die( __( 'Cheatin&#8217; uh?', 'give' ), __( 'Error', 'give' ), array(
44
+	if ( ! wp_verify_nonce($nonce, 'edit-donor')) {
45
+		wp_die(__('Cheatin&#8217; uh?', 'give'), __('Error', 'give'), array(
46 46
 			'response' => 400,
47
-		) );
47
+		));
48 48
 	}
49 49
 
50
-	$donor = new Give_Donor( $donor_id );
50
+	$donor = new Give_Donor($donor_id);
51 51
 
52
-	if ( empty( $donor->id ) ) {
52
+	if (empty($donor->id)) {
53 53
 		return false;
54 54
 	}
55 55
 
@@ -64,39 +64,39 @@  discard block
 block discarded – undo
64 64
 		'country' => '',
65 65
 	);
66 66
 
67
-	$donor_info = wp_parse_args( $donor_info, $defaults );
67
+	$donor_info = wp_parse_args($donor_info, $defaults);
68 68
 
69
-	if ( (int) $donor_info['user_id'] !== (int) $donor->user_id ) {
69
+	if ((int) $donor_info['user_id'] !== (int) $donor->user_id) {
70 70
 
71 71
 		// Make sure we don't already have this user attached to a donor.
72
-		if ( ! empty( $donor_info['user_id'] ) && false !== Give()->donors->get_donor_by( 'user_id', $donor_info['user_id'] ) ) {
73
-			give_set_error( 'give-invalid-donor-user_id', sprintf( __( 'The User ID #%d is already associated with a different donor.', 'give' ), $donor_info['user_id'] ) );
72
+		if ( ! empty($donor_info['user_id']) && false !== Give()->donors->get_donor_by('user_id', $donor_info['user_id'])) {
73
+			give_set_error('give-invalid-donor-user_id', sprintf(__('The User ID #%d is already associated with a different donor.', 'give'), $donor_info['user_id']));
74 74
 		}
75 75
 
76 76
 		// Make sure it's actually a user.
77
-		$user = get_user_by( 'id', $donor_info['user_id'] );
78
-		if ( ! empty( $donor_info['user_id'] ) && false === $user ) {
79
-			give_set_error( 'give-invalid-user_id', sprintf( __( 'The User ID #%d does not exist. Please assign an existing user.', 'give' ), $donor_info['user_id'] ) );
77
+		$user = get_user_by('id', $donor_info['user_id']);
78
+		if ( ! empty($donor_info['user_id']) && false === $user) {
79
+			give_set_error('give-invalid-user_id', sprintf(__('The User ID #%d does not exist. Please assign an existing user.', 'give'), $donor_info['user_id']));
80 80
 		}
81 81
 	}
82 82
 
83
-	if ( give_get_errors() ) {
83
+	if (give_get_errors()) {
84 84
 		return false;
85 85
 	}
86 86
 
87 87
 	// If First name of donor is empty, then fetch the current first name of donor.
88
-	if ( empty( $donor_info['first_name'] ) ) {
88
+	if (empty($donor_info['first_name'])) {
89 89
 		$donor_info['first_name'] = $donor->get_first_name();
90 90
 	}
91 91
 
92 92
 	// Sanitize the inputs.
93 93
 	$donor_data               = array();
94
-	$donor_data['name']       = trim( "{$donor_info['first_name']} {$donor_info['last_name']}" );
94
+	$donor_data['name']       = trim("{$donor_info['first_name']} {$donor_info['last_name']}");
95 95
 	$donor_data['first_name'] = $donor_info['first_name'];
96 96
 	$donor_data['last_name']  = $donor_info['last_name'];
97 97
 	$donor_data['user_id']    = $donor_info['user_id'];
98 98
 
99
-	$donor_data             = apply_filters( 'give_edit_donor_info', $donor_data, $donor_id );
99
+	$donor_data = apply_filters('give_edit_donor_info', $donor_data, $donor_id);
100 100
 
101 101
 	/**
102 102
 	 * Filter the address
@@ -104,28 +104,28 @@  discard block
 block discarded – undo
104 104
 	 *
105 105
 	 * @since 1.0
106 106
 	 */
107
-	$address                = apply_filters( 'give_edit_donor_address', array(), $donor_id );
107
+	$address                = apply_filters('give_edit_donor_address', array(), $donor_id);
108 108
 
109
-	$donor_data             = give_clean( $donor_data );
110
-	$address                = give_clean( $address );
109
+	$donor_data             = give_clean($donor_data);
110
+	$address                = give_clean($address);
111 111
 
112
-	$output = give_connect_user_donor_profile( $donor, $donor_data, $address );
112
+	$output = give_connect_user_donor_profile($donor, $donor_data, $address);
113 113
 
114
-	if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
115
-		header( 'Content-Type: application/json' );
116
-		echo json_encode( $output );
114
+	if (defined('DOING_AJAX') && DOING_AJAX) {
115
+		header('Content-Type: application/json');
116
+		echo json_encode($output);
117 117
 		wp_die();
118 118
 	}
119 119
 
120
-	if ( $output['success'] ) {
121
-		wp_redirect( admin_url( "edit.php?post_type=give_forms&page=give-donors&view=overview&id={$donor_id}&give-messages[]=profile-updated" ) );
120
+	if ($output['success']) {
121
+		wp_redirect(admin_url("edit.php?post_type=give_forms&page=give-donors&view=overview&id={$donor_id}&give-messages[]=profile-updated"));
122 122
 	}
123 123
 
124 124
 	exit;
125 125
 
126 126
 }
127 127
 
128
-add_action( 'give_edit-donor', 'give_edit_donor', 10, 1 );
128
+add_action('give_edit-donor', 'give_edit_donor', 10, 1);
129 129
 
130 130
 /**
131 131
  * Save a donor note.
@@ -136,40 +136,40 @@  discard block
 block discarded – undo
136 136
  *
137 137
  * @return int The Note ID that was saved, or 0 if nothing was saved.
138 138
  */
139
-function give_donor_save_note( $args ) {
139
+function give_donor_save_note($args) {
140 140
 
141
-	$donor_view_role = apply_filters( 'give_view_donors_role', 'view_give_reports' );
141
+	$donor_view_role = apply_filters('give_view_donors_role', 'view_give_reports');
142 142
 
143
-	if ( ! is_admin() || ! current_user_can( $donor_view_role ) ) {
144
-		wp_die( __( 'You do not have permission to edit this donor.', 'give' ), __( 'Error', 'give' ), array(
143
+	if ( ! is_admin() || ! current_user_can($donor_view_role)) {
144
+		wp_die(__('You do not have permission to edit this donor.', 'give'), __('Error', 'give'), array(
145 145
 			'response' => 403,
146
-		) );
146
+		));
147 147
 	}
148 148
 
149
-	if ( empty( $args ) ) {
149
+	if (empty($args)) {
150 150
 		return false;
151 151
 	}
152 152
 
153
-	$donor_note = trim( give_clean( $args['donor_note'] ) );
153
+	$donor_note = trim(give_clean($args['donor_note']));
154 154
 	$donor_id   = (int) $args['customer_id'];
155 155
 	$nonce      = $args['add_donor_note_nonce'];
156 156
 
157
-	if ( ! wp_verify_nonce( $nonce, 'add-donor-note' ) ) {
158
-		wp_die( __( 'Cheatin&#8217; uh?', 'give' ), __( 'Error', 'give' ), array(
157
+	if ( ! wp_verify_nonce($nonce, 'add-donor-note')) {
158
+		wp_die(__('Cheatin&#8217; uh?', 'give'), __('Error', 'give'), array(
159 159
 			'response' => 400,
160
-		) );
160
+		));
161 161
 	}
162 162
 
163
-	if ( empty( $donor_note ) ) {
164
-		give_set_error( 'empty-donor-note', __( 'A note is required.', 'give' ) );
163
+	if (empty($donor_note)) {
164
+		give_set_error('empty-donor-note', __('A note is required.', 'give'));
165 165
 	}
166 166
 
167
-	if ( give_get_errors() ) {
167
+	if (give_get_errors()) {
168 168
 		return false;
169 169
 	}
170 170
 
171
-	$donor    = new Give_Donor( $donor_id );
172
-	$new_note = $donor->add_note( $donor_note );
171
+	$donor    = new Give_Donor($donor_id);
172
+	$new_note = $donor->add_note($donor_note);
173 173
 
174 174
 	/**
175 175
 	 * Fires before inserting donor note.
@@ -179,22 +179,22 @@  discard block
 block discarded – undo
179 179
 	 *
180 180
 	 * @since 1.0
181 181
 	 */
182
-	do_action( 'give_pre_insert_donor_note', $donor_id, $new_note );
182
+	do_action('give_pre_insert_donor_note', $donor_id, $new_note);
183 183
 
184
-	if ( ! empty( $new_note ) && ! empty( $donor->id ) ) {
184
+	if ( ! empty($new_note) && ! empty($donor->id)) {
185 185
 
186 186
 		ob_start();
187 187
 		?>
188 188
 		<div class="donor-note-wrapper dashboard-comment-wrap comment-item">
189 189
 			<span class="note-content-wrap">
190
-				<?php echo stripslashes( $new_note ); ?>
190
+				<?php echo stripslashes($new_note); ?>
191 191
 			</span>
192 192
 		</div>
193 193
 		<?php
194 194
 		$output = ob_get_contents();
195 195
 		ob_end_clean();
196 196
 
197
-		if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
197
+		if (defined('DOING_AJAX') && DOING_AJAX) {
198 198
 			echo $output;
199 199
 			exit;
200 200
 		}
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
 }
209 209
 
210
-add_action( 'give_add-donor-note', 'give_donor_save_note', 10, 1 );
210
+add_action('give_add-donor-note', 'give_donor_save_note', 10, 1);
211 211
 
212 212
 /**
213 213
  * Delete a donor.
@@ -218,41 +218,41 @@  discard block
 block discarded – undo
218 218
  *
219 219
  * @return int Whether it was a successful deletion.
220 220
  */
221
-function give_donor_delete( $args ) {
221
+function give_donor_delete($args) {
222 222
 
223
-	$donor_edit_role = apply_filters( 'give_edit_donors_role', 'edit_give_payments' );
223
+	$donor_edit_role = apply_filters('give_edit_donors_role', 'edit_give_payments');
224 224
 
225
-	if ( ! is_admin() || ! current_user_can( $donor_edit_role ) ) {
226
-		wp_die( __( 'You do not have permission to delete donors.', 'give' ), __( 'Error', 'give' ), array(
225
+	if ( ! is_admin() || ! current_user_can($donor_edit_role)) {
226
+		wp_die(__('You do not have permission to delete donors.', 'give'), __('Error', 'give'), array(
227 227
 			'response' => 403,
228
-		) );
228
+		));
229 229
 	}
230 230
 
231
-	if ( empty( $args ) ) {
231
+	if (empty($args)) {
232 232
 		return false;
233 233
 	}
234 234
 
235 235
 	$donor_id    = (int) $args['customer_id'];
236
-	$confirm     = ! empty( $args['give-donor-delete-confirm'] ) ? true : false;
237
-	$remove_data = ! empty( $args['give-donor-delete-records'] ) ? true : false;
236
+	$confirm     = ! empty($args['give-donor-delete-confirm']) ? true : false;
237
+	$remove_data = ! empty($args['give-donor-delete-records']) ? true : false;
238 238
 	$nonce       = $args['_wpnonce'];
239 239
 
240
-	if ( ! wp_verify_nonce( $nonce, 'delete-donor' ) ) {
241
-		wp_die( __( 'Cheatin&#8217; uh?', 'give' ), __( 'Error', 'give' ), array(
240
+	if ( ! wp_verify_nonce($nonce, 'delete-donor')) {
241
+		wp_die(__('Cheatin&#8217; uh?', 'give'), __('Error', 'give'), array(
242 242
 			'response' => 400,
243
-		) );
243
+		));
244 244
 	}
245 245
 
246
-	if ( ! $confirm ) {
247
-		give_set_error( 'donor-delete-no-confirm', __( 'Please confirm you want to delete this donor.', 'give' ) );
246
+	if ( ! $confirm) {
247
+		give_set_error('donor-delete-no-confirm', __('Please confirm you want to delete this donor.', 'give'));
248 248
 	}
249 249
 
250
-	if ( give_get_errors() ) {
251
-		wp_redirect( admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor_id ) );
250
+	if (give_get_errors()) {
251
+		wp_redirect(admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor_id));
252 252
 		exit;
253 253
 	}
254 254
 
255
-	$donor = new Give_Donor( $donor_id );
255
+	$donor = new Give_Donor($donor_id);
256 256
 
257 257
 	/**
258 258
 	 * Fires before deleting donor.
@@ -263,50 +263,50 @@  discard block
 block discarded – undo
263 263
 	 *
264 264
 	 * @since 1.0
265 265
 	 */
266
-	do_action( 'give_pre_delete_donor', $donor_id, $confirm, $remove_data );
266
+	do_action('give_pre_delete_donor', $donor_id, $confirm, $remove_data);
267 267
 
268
-	if ( $donor->id > 0 ) {
268
+	if ($donor->id > 0) {
269 269
 
270
-		$payments_array = explode( ',', $donor->payment_ids );
271
-		$success        = Give()->donors->delete( $donor->id );
270
+		$payments_array = explode(',', $donor->payment_ids);
271
+		$success        = Give()->donors->delete($donor->id);
272 272
 
273
-		if ( $success ) {
273
+		if ($success) {
274 274
 
275
-			if ( $remove_data ) {
275
+			if ($remove_data) {
276 276
 
277 277
 				// Remove all donations, logs, etc.
278
-				foreach ( $payments_array as $payment_id ) {
279
-					give_delete_donation( $payment_id );
278
+				foreach ($payments_array as $payment_id) {
279
+					give_delete_donation($payment_id);
280 280
 				}
281 281
 			} else {
282 282
 
283 283
 				// Just set the donations to customer_id of 0.
284
-				foreach ( $payments_array as $payment_id ) {
285
-					give_update_payment_meta( $payment_id, '_give_payment_donor_id', 0 );
284
+				foreach ($payments_array as $payment_id) {
285
+					give_update_payment_meta($payment_id, '_give_payment_donor_id', 0);
286 286
 				}
287 287
 			}
288 288
 
289
-			$redirect = admin_url( 'edit.php?post_type=give_forms&page=give-donors&give-messages[]=donor-deleted' );
289
+			$redirect = admin_url('edit.php?post_type=give_forms&page=give-donors&give-messages[]=donor-deleted');
290 290
 
291 291
 		} else {
292 292
 
293
-			give_set_error( 'give-donor-delete-failed', __( 'Error deleting donor.', 'give' ) );
294
-			$redirect = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=delete&id=' . $donor_id );
293
+			give_set_error('give-donor-delete-failed', __('Error deleting donor.', 'give'));
294
+			$redirect = admin_url('edit.php?post_type=give_forms&page=give-donors&view=delete&id='.$donor_id);
295 295
 
296 296
 		}
297 297
 	} else {
298 298
 
299
-		give_set_error( 'give-donor-delete-invalid-id', __( 'Invalid Donor ID.', 'give' ) );
300
-		$redirect = admin_url( 'edit.php?post_type=give_forms&page=give-donors' );
299
+		give_set_error('give-donor-delete-invalid-id', __('Invalid Donor ID.', 'give'));
300
+		$redirect = admin_url('edit.php?post_type=give_forms&page=give-donors');
301 301
 
302 302
 	}
303 303
 
304
-	wp_redirect( $redirect );
304
+	wp_redirect($redirect);
305 305
 	exit;
306 306
 
307 307
 }
308 308
 
309
-add_action( 'give_delete-donor', 'give_donor_delete', 10, 1 );
309
+add_action('give_delete-donor', 'give_donor_delete', 10, 1);
310 310
 
311 311
 /**
312 312
  * Disconnect a user ID from a donor
@@ -317,17 +317,17 @@  discard block
 block discarded – undo
317 317
  *
318 318
  * @return bool|array If the disconnect was successful.
319 319
  */
320
-function give_disconnect_donor_user_id( $args ) {
320
+function give_disconnect_donor_user_id($args) {
321 321
 
322
-	$donor_edit_role = apply_filters( 'give_edit_donors_role', 'edit_give_payments' );
322
+	$donor_edit_role = apply_filters('give_edit_donors_role', 'edit_give_payments');
323 323
 
324
-	if ( ! is_admin() || ! current_user_can( $donor_edit_role ) ) {
325
-		wp_die( __( 'You do not have permission to edit this donor.', 'give' ), __( 'Error', 'give' ), array(
324
+	if ( ! is_admin() || ! current_user_can($donor_edit_role)) {
325
+		wp_die(__('You do not have permission to edit this donor.', 'give'), __('Error', 'give'), array(
326 326
 			'response' => 403,
327
-		) );
327
+		));
328 328
 	}
329 329
 
330
-	if ( empty( $args ) ) {
330
+	if (empty($args)) {
331 331
 		return false;
332 332
 	}
333 333
 
@@ -335,14 +335,14 @@  discard block
 block discarded – undo
335 335
 
336 336
 	$nonce = $args['_wpnonce'];
337 337
 
338
-	if ( ! wp_verify_nonce( $nonce, 'edit-donor' ) ) {
339
-		wp_die( __( 'Cheatin&#8217; uh?', 'give' ), __( 'Error', 'give' ), array(
338
+	if ( ! wp_verify_nonce($nonce, 'edit-donor')) {
339
+		wp_die(__('Cheatin&#8217; uh?', 'give'), __('Error', 'give'), array(
340 340
 			'response' => 400,
341
-		) );
341
+		));
342 342
 	}
343 343
 
344
-	$donor = new Give_Donor( $donor_id );
345
-	if ( empty( $donor->id ) ) {
344
+	$donor = new Give_Donor($donor_id);
345
+	if (empty($donor->id)) {
346 346
 		return false;
347 347
 	}
348 348
 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 	 *
357 357
 	 * @since 1.0
358 358
 	 */
359
-	do_action( 'give_pre_donor_disconnect_user_id', $donor_id, $user_id );
359
+	do_action('give_pre_donor_disconnect_user_id', $donor_id, $user_id);
360 360
 
361 361
 	$output     = array();
362 362
 	$donor_args = array(
@@ -365,19 +365,19 @@  discard block
 block discarded – undo
365 365
 
366 366
 
367 367
 	$output['success'] = true;
368
-	if ( ! $donor->update( $donor_args ) ) {
369
-		update_user_meta( $user_id, '_give_is_donor_disconnected', true );
370
-		update_user_meta( $user_id, '_give_disconnected_donor_id', $donor->id );
371
-		$donor->update_meta( '_give_disconnected_user_id', $user_id );
368
+	if ( ! $donor->update($donor_args)) {
369
+		update_user_meta($user_id, '_give_is_donor_disconnected', true);
370
+		update_user_meta($user_id, '_give_disconnected_donor_id', $donor->id);
371
+		$donor->update_meta('_give_disconnected_user_id', $user_id);
372 372
 
373 373
 		$output['success'] = true;
374 374
 
375 375
 	} else {
376 376
 		$output['success'] = false;
377
-		give_set_error( 'give-disconnect-user-fail', __( 'Failed to disconnect user from donor.', 'give' ) );
377
+		give_set_error('give-disconnect-user-fail', __('Failed to disconnect user from donor.', 'give'));
378 378
 	}
379 379
 
380
-	$output['redirect'] = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' ) . $donor_id;
380
+	$output['redirect'] = admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id=').$donor_id;
381 381
 
382 382
 	/**
383 383
 	 * Fires after disconnecting user ID from a donor.
@@ -386,11 +386,11 @@  discard block
 block discarded – undo
386 386
 	 *
387 387
 	 * @since 1.0
388 388
 	 */
389
-	do_action( 'give_post_donor_disconnect_user_id', $donor_id );
389
+	do_action('give_post_donor_disconnect_user_id', $donor_id);
390 390
 
391
-	if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
392
-		header( 'Content-Type: application/json' );
393
-		echo json_encode( $output );
391
+	if (defined('DOING_AJAX') && DOING_AJAX) {
392
+		header('Content-Type: application/json');
393
+		echo json_encode($output);
394 394
 		wp_die();
395 395
 	}
396 396
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 
399 399
 }
400 400
 
401
-add_action( 'give_disconnect-userid', 'give_disconnect_donor_user_id', 10, 1 );
401
+add_action('give_disconnect-userid', 'give_disconnect_donor_user_id', 10, 1);
402 402
 
403 403
 /**
404 404
  * Add an email address to the donor from within the admin and log a donor note.
@@ -409,86 +409,86 @@  discard block
 block discarded – undo
409 409
  *
410 410
  * @return mixed If DOING_AJAX echos out JSON, otherwise returns array of success (bool) and message (string).
411 411
  */
412
-function give_add_donor_email( $args ) {
412
+function give_add_donor_email($args) {
413 413
 
414 414
 	$donor_id = '';
415
-	$donor_edit_role = apply_filters( 'give_edit_donors_role', 'edit_give_payments' );
415
+	$donor_edit_role = apply_filters('give_edit_donors_role', 'edit_give_payments');
416 416
 
417
-	if ( ! is_admin() || ! current_user_can( $donor_edit_role ) ) {
418
-		wp_die( __( 'You do not have permission to edit this donor.', 'give' ), __( 'Error', 'give' ), array(
417
+	if ( ! is_admin() || ! current_user_can($donor_edit_role)) {
418
+		wp_die(__('You do not have permission to edit this donor.', 'give'), __('Error', 'give'), array(
419 419
 			'response' => 403,
420
-		) );
420
+		));
421 421
 	}
422 422
 
423 423
 	$output = array();
424
-	if ( empty( $args ) || empty( $args['email'] ) || empty( $args['customer_id'] ) ) {
424
+	if (empty($args) || empty($args['email']) || empty($args['customer_id'])) {
425 425
 		$output['success'] = false;
426
-		if ( empty( $args['email'] ) ) {
427
-			$output['message'] = __( 'Email address is required.', 'give' );
428
-		} elseif ( empty( $args['customer_id'] ) ) {
429
-			$output['message'] = __( 'Donor ID is required.', 'give' );
426
+		if (empty($args['email'])) {
427
+			$output['message'] = __('Email address is required.', 'give');
428
+		} elseif (empty($args['customer_id'])) {
429
+			$output['message'] = __('Donor ID is required.', 'give');
430 430
 		} else {
431
-			$output['message'] = __( 'An error has occurred. Please try again.', 'give' );
431
+			$output['message'] = __('An error has occurred. Please try again.', 'give');
432 432
 		}
433
-	} elseif ( ! wp_verify_nonce( $args['_wpnonce'], 'give_add_donor_email' ) ) {
433
+	} elseif ( ! wp_verify_nonce($args['_wpnonce'], 'give_add_donor_email')) {
434 434
 		$output = array(
435 435
 			'success' => false,
436
-			'message' => __( 'Nonce verification failed.', 'give' ),
436
+			'message' => __('Nonce verification failed.', 'give'),
437 437
 		);
438
-	} elseif ( ! is_email( $args['email'] ) ) {
438
+	} elseif ( ! is_email($args['email'])) {
439 439
 		$output = array(
440 440
 			'success' => false,
441
-			'message' => __( 'Invalid email.', 'give' ),
441
+			'message' => __('Invalid email.', 'give'),
442 442
 		);
443 443
 	} else {
444
-		$email    = sanitize_email( $args['email'] );
444
+		$email    = sanitize_email($args['email']);
445 445
 		$donor_id = (int) $args['customer_id'];
446 446
 		$primary  = 'true' === $args['primary'] ? true : false;
447
-		$donor    = new Give_Donor( $donor_id );
448
-		if ( false === $donor->add_email( $email, $primary ) ) {
449
-			if ( in_array( $email, $donor->emails ) ) {
447
+		$donor    = new Give_Donor($donor_id);
448
+		if (false === $donor->add_email($email, $primary)) {
449
+			if (in_array($email, $donor->emails)) {
450 450
 				$output = array(
451 451
 					'success' => false,
452
-					'message' => __( 'Email already associated with this donor.', 'give' ),
452
+					'message' => __('Email already associated with this donor.', 'give'),
453 453
 				);
454 454
 			} else {
455 455
 				$output = array(
456 456
 					'success' => false,
457
-					'message' => __( 'Email address is already associated with another donor.', 'give' ),
457
+					'message' => __('Email address is already associated with another donor.', 'give'),
458 458
 				);
459 459
 			}
460 460
 		} else {
461
-			$redirect = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor_id . '&give-messages[]=email-added' );
461
+			$redirect = admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor_id.'&give-messages[]=email-added');
462 462
 			$output   = array(
463 463
 				'success'  => true,
464
-				'message'  => __( 'Email successfully added to donor.', 'give' ),
464
+				'message'  => __('Email successfully added to donor.', 'give'),
465 465
 				'redirect' => $redirect,
466 466
 			);
467 467
 
468 468
 			$user       = wp_get_current_user();
469
-			$user_login = ! empty( $user->user_login ) ? $user->user_login : __( 'System', 'give' );
470
-			$donor_note = sprintf( __( 'Email address %1$s added by %2$s', 'give' ), $email, $user_login );
471
-			$donor->add_note( $donor_note );
469
+			$user_login = ! empty($user->user_login) ? $user->user_login : __('System', 'give');
470
+			$donor_note = sprintf(__('Email address %1$s added by %2$s', 'give'), $email, $user_login);
471
+			$donor->add_note($donor_note);
472 472
 
473
-			if ( $primary ) {
474
-				$donor_note = sprintf( __( 'Email address %1$s set as primary by %2$s', 'give' ), $email, $user_login );
475
-				$donor->add_note( $donor_note );
473
+			if ($primary) {
474
+				$donor_note = sprintf(__('Email address %1$s set as primary by %2$s', 'give'), $email, $user_login);
475
+				$donor->add_note($donor_note);
476 476
 			}
477 477
 		}
478 478
 	} // End if().
479 479
 
480
-	do_action( 'give_post_add_donor_email', $donor_id, $args );
480
+	do_action('give_post_add_donor_email', $donor_id, $args);
481 481
 
482
-	if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
483
-		header( 'Content-Type: application/json' );
484
-		echo json_encode( $output );
482
+	if (defined('DOING_AJAX') && DOING_AJAX) {
483
+		header('Content-Type: application/json');
484
+		echo json_encode($output);
485 485
 		wp_die();
486 486
 	}
487 487
 
488 488
 	return $output;
489 489
 }
490 490
 
491
-add_action( 'give_add_donor_email', 'give_add_donor_email', 10, 1 );
491
+add_action('give_add_donor_email', 'give_add_donor_email', 10, 1);
492 492
 
493 493
 
494 494
 /**
@@ -499,39 +499,39 @@  discard block
 block discarded – undo
499 499
  * @return bool|null
500 500
  */
501 501
 function give_remove_donor_email() {
502
-	if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) {
502
+	if (empty($_GET['id']) || ! is_numeric($_GET['id'])) {
503 503
 		return false;
504 504
 	}
505
-	if ( empty( $_GET['email'] ) || ! is_email( $_GET['email'] ) ) {
505
+	if (empty($_GET['email']) || ! is_email($_GET['email'])) {
506 506
 		return false;
507 507
 	}
508
-	if ( empty( $_GET['_wpnonce'] ) ) {
508
+	if (empty($_GET['_wpnonce'])) {
509 509
 		return false;
510 510
 	}
511 511
 
512 512
 	$nonce = $_GET['_wpnonce'];
513
-	if ( ! wp_verify_nonce( $nonce, 'give-remove-donor-email' ) ) {
514
-		wp_die( __( 'Nonce verification failed', 'give' ), __( 'Error', 'give' ), array(
513
+	if ( ! wp_verify_nonce($nonce, 'give-remove-donor-email')) {
514
+		wp_die(__('Nonce verification failed', 'give'), __('Error', 'give'), array(
515 515
 			'response' => 403,
516
-		) );
516
+		));
517 517
 	}
518 518
 
519
-	$donor = new Give_Donor( $_GET['id'] );
520
-	if ( $donor->remove_email( $_GET['email'] ) ) {
521
-		$url        = add_query_arg( 'give-messages[]', 'email-removed', admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor->id ) );
519
+	$donor = new Give_Donor($_GET['id']);
520
+	if ($donor->remove_email($_GET['email'])) {
521
+		$url        = add_query_arg('give-messages[]', 'email-removed', admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor->id));
522 522
 		$user       = wp_get_current_user();
523
-		$user_login = ! empty( $user->user_login ) ? $user->user_login : __( 'System', 'give' );
524
-		$donor_note = sprintf( __( 'Email address %1$s removed by %2$s', 'give' ), $_GET['email'], $user_login );
525
-		$donor->add_note( $donor_note );
523
+		$user_login = ! empty($user->user_login) ? $user->user_login : __('System', 'give');
524
+		$donor_note = sprintf(__('Email address %1$s removed by %2$s', 'give'), $_GET['email'], $user_login);
525
+		$donor->add_note($donor_note);
526 526
 	} else {
527
-		$url = add_query_arg( 'give-messages[]', 'email-remove-failed', admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor->id ) );
527
+		$url = add_query_arg('give-messages[]', 'email-remove-failed', admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor->id));
528 528
 	}
529 529
 
530
-	wp_safe_redirect( $url );
530
+	wp_safe_redirect($url);
531 531
 	exit;
532 532
 }
533 533
 
534
-add_action( 'give_remove_donor_email', 'give_remove_donor_email', 10 );
534
+add_action('give_remove_donor_email', 'give_remove_donor_email', 10);
535 535
 
536 536
 
537 537
 /**
@@ -543,44 +543,44 @@  discard block
 block discarded – undo
543 543
  * @return bool|null
544 544
  */
545 545
 function give_set_donor_primary_email() {
546
-	if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) {
546
+	if (empty($_GET['id']) || ! is_numeric($_GET['id'])) {
547 547
 		return false;
548 548
 	}
549 549
 
550
-	if ( empty( $_GET['email'] ) || ! is_email( $_GET['email'] ) ) {
550
+	if (empty($_GET['email']) || ! is_email($_GET['email'])) {
551 551
 		return false;
552 552
 	}
553 553
 
554
-	if ( empty( $_GET['_wpnonce'] ) ) {
554
+	if (empty($_GET['_wpnonce'])) {
555 555
 		return false;
556 556
 	}
557 557
 
558 558
 	$nonce = $_GET['_wpnonce'];
559 559
 
560
-	if ( ! wp_verify_nonce( $nonce, 'give-set-donor-primary-email' ) ) {
561
-		wp_die( __( 'Nonce verification failed', 'give' ), __( 'Error', 'give' ), array(
560
+	if ( ! wp_verify_nonce($nonce, 'give-set-donor-primary-email')) {
561
+		wp_die(__('Nonce verification failed', 'give'), __('Error', 'give'), array(
562 562
 			'response' => 403,
563
-		) );
563
+		));
564 564
 	}
565 565
 
566
-	$donor = new Give_Donor( $_GET['id'] );
566
+	$donor = new Give_Donor($_GET['id']);
567 567
 
568
-	if ( $donor->set_primary_email( $_GET['email'] ) ) {
569
-		$url        = add_query_arg( 'give-messages[]', 'primary-email-updated', admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor->id ) );
568
+	if ($donor->set_primary_email($_GET['email'])) {
569
+		$url        = add_query_arg('give-messages[]', 'primary-email-updated', admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor->id));
570 570
 		$user       = wp_get_current_user();
571
-		$user_login = ! empty( $user->user_login ) ? $user->user_login : __( 'System', 'give' );
572
-		$donor_note = sprintf( __( 'Email address %1$s set as primary by %2$s', 'give' ), $_GET['email'], $user_login );
571
+		$user_login = ! empty($user->user_login) ? $user->user_login : __('System', 'give');
572
+		$donor_note = sprintf(__('Email address %1$s set as primary by %2$s', 'give'), $_GET['email'], $user_login);
573 573
 
574
-		$donor->add_note( $donor_note );
574
+		$donor->add_note($donor_note);
575 575
 	} else {
576
-		$url = add_query_arg( 'give-messages[]', 'primary-email-failed', admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor->id ) );
576
+		$url = add_query_arg('give-messages[]', 'primary-email-failed', admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor->id));
577 577
 	}
578 578
 
579
-	wp_safe_redirect( $url );
579
+	wp_safe_redirect($url);
580 580
 	exit;
581 581
 }
582 582
 
583
-add_action( 'give_set_donor_primary_email', 'give_set_donor_primary_email', 10 );
583
+add_action('give_set_donor_primary_email', 'give_set_donor_primary_email', 10);
584 584
 
585 585
 /**
586 586
  * Delete Donor using Bulk Actions.
@@ -591,57 +591,57 @@  discard block
 block discarded – undo
591 591
  *
592 592
  * @return void
593 593
  */
594
-function give_delete_donor( $args ) {
594
+function give_delete_donor($args) {
595 595
 
596
-	$donor_edit_role = apply_filters( 'give_edit_donors_role', 'edit_give_payments' );
596
+	$donor_edit_role = apply_filters('give_edit_donors_role', 'edit_give_payments');
597 597
 
598
-	if ( ! is_admin() || ! current_user_can( $donor_edit_role ) ) {
599
-		wp_die( __( 'You do not have permission to delete donors.', 'give' ), __( 'Error', 'give' ), array(
598
+	if ( ! is_admin() || ! current_user_can($donor_edit_role)) {
599
+		wp_die(__('You do not have permission to delete donors.', 'give'), __('Error', 'give'), array(
600 600
 			'response' => 403,
601
-		) );
601
+		));
602 602
 	}
603 603
 
604 604
 	$give_args            = array();
605
-	$donor_ids            = ( ! empty( $_GET['donor'] ) && is_array( $_GET['donor'] ) && count( $_GET['donor'] ) > 0 ) ? $_GET['donor'] : array();
606
-	$delete_donor         = ! empty( $_GET['give-delete-donor-confirm'] ) ? $_GET['give-delete-donor-confirm'] : '';
607
-	$delete_donations     = ! empty( $_GET['give-delete-donor-records'] ) ? $_GET['give-delete-donor-records'] : '';
608
-	$search_keyword       = ! empty( $_GET['s'] ) ? $_GET['s'] : '';
609
-	$give_args['orderby'] = ! empty( $_GET['orderby'] ) ? $_GET['orderby'] : 'id';
610
-	$give_args['order']   = ! empty( $_GET['order'] ) ? $_GET['order'] : 'desc';
605
+	$donor_ids            = ( ! empty($_GET['donor']) && is_array($_GET['donor']) && count($_GET['donor']) > 0) ? $_GET['donor'] : array();
606
+	$delete_donor         = ! empty($_GET['give-delete-donor-confirm']) ? $_GET['give-delete-donor-confirm'] : '';
607
+	$delete_donations     = ! empty($_GET['give-delete-donor-records']) ? $_GET['give-delete-donor-records'] : '';
608
+	$search_keyword       = ! empty($_GET['s']) ? $_GET['s'] : '';
609
+	$give_args['orderby'] = ! empty($_GET['orderby']) ? $_GET['orderby'] : 'id';
610
+	$give_args['order']   = ! empty($_GET['order']) ? $_GET['order'] : 'desc';
611 611
 	$nonce                = $args['_wpnonce'];
612 612
 
613 613
 	// Verify Nonce for deleting bulk donors.
614
-	if ( ! wp_verify_nonce( $nonce, 'bulk-donors' ) ) {
615
-		wp_die( __( 'Cheatin&#8217; uh?', 'give' ), __( 'Error', 'give' ), array(
614
+	if ( ! wp_verify_nonce($nonce, 'bulk-donors')) {
615
+		wp_die(__('Cheatin&#8217; uh?', 'give'), __('Error', 'give'), array(
616 616
 			'response' => 400,
617
-		) );
617
+		));
618 618
 	}
619 619
 
620
-	if( count( $donor_ids ) > 0 ) {
621
-		foreach ( $donor_ids as $donor_id ) {
622
-			$donor = new Give_Donor( $donor_id );
620
+	if (count($donor_ids) > 0) {
621
+		foreach ($donor_ids as $donor_id) {
622
+			$donor = new Give_Donor($donor_id);
623 623
 
624
-			if ( $donor->id > 0 ) {
624
+			if ($donor->id > 0) {
625 625
 
626
-				if( $delete_donor ) {
627
-					$donor_deleted = Give()->donors->delete( $donor->id );
626
+				if ($delete_donor) {
627
+					$donor_deleted = Give()->donors->delete($donor->id);
628 628
 
629
-					if ( $donor_deleted ) {
630
-						$donation_ids  = explode( ',', $donor->payment_ids );
629
+					if ($donor_deleted) {
630
+						$donation_ids = explode(',', $donor->payment_ids);
631 631
 
632
-						if( $delete_donations ) {
632
+						if ($delete_donations) {
633 633
 
634 634
 							// Remove all donations, logs, etc.
635
-							foreach ( $donation_ids as $donation_id ) {
636
-								give_delete_donation( $donation_id );
635
+							foreach ($donation_ids as $donation_id) {
636
+								give_delete_donation($donation_id);
637 637
 							}
638 638
 
639 639
 							$give_args['give-messages[]'] = 'donor-donations-deleted';
640 640
 						} else {
641 641
 
642 642
 							// Just set the donations to customer_id of 0.
643
-							foreach ( $donation_ids as $donation_id ) {
644
-								give_update_payment_meta( $donation_id, '_give_payment_customer_id', 0 );
643
+							foreach ($donation_ids as $donation_id) {
644
+								give_update_payment_meta($donation_id, '_give_payment_customer_id', 0);
645 645
 							}
646 646
 
647 647
 							$give_args['give-messages[]'] = 'donor-deleted';
@@ -658,13 +658,13 @@  discard block
 block discarded – undo
658 658
 		}
659 659
 
660 660
 		// Add Search Keyword on redirection, if it exists.
661
-		if ( ! empty( $search_keyword ) ) {
661
+		if ( ! empty($search_keyword)) {
662 662
 			$give_args['s'] = $search_keyword;
663 663
 		}
664 664
 
665
-		wp_redirect( add_query_arg( $give_args, admin_url( 'edit.php?post_type=give_forms&page=give-donors' ) ) );
665
+		wp_redirect(add_query_arg($give_args, admin_url('edit.php?post_type=give_forms&page=give-donors')));
666 666
 		give_die();
667 667
 	}
668 668
 }
669 669
 
670
-add_action( 'give_delete_donor', 'give_delete_donor' );
671 670
\ No newline at end of file
671
+add_action('give_delete_donor', 'give_delete_donor');
672 672
\ No newline at end of file
Please login to merge, or discard this patch.
includes/admin/class-i18n-module.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
 	 *
66 66
 	 * @param $args
67 67
 	 */
68
-	public function __construct( $args ) {
68
+	public function __construct($args) {
69 69
 
70 70
 		// Only for admins.
71
-		if ( ! is_admin() ) {
71
+		if ( ! is_admin()) {
72 72
 			return;
73 73
 		}
74 74
 
75
-		foreach ( $args as $key => $arg ) {
75
+		foreach ($args as $key => $arg) {
76 76
 			$this->$key = $arg;
77 77
 		}
78 78
 
79
-		add_action( 'admin_init', array( $this, 'init' ) );
79
+		add_action('admin_init', array($this, 'init'));
80 80
 
81 81
 
82 82
 	}
@@ -87,19 +87,19 @@  discard block
 block discarded – undo
87 87
 	function init() {
88 88
 
89 89
 		// First get user's locale (4.7+).
90
-		$this->locale = function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();
90
+		$this->locale = function_exists('get_user_locale') ? get_user_locale() : get_locale();
91 91
 
92 92
 		// This plugin is en_US native.
93
-		if ( 'en_US' === $this->locale ) {
93
+		if ('en_US' === $this->locale) {
94 94
 			return;
95 95
 		}
96 96
 
97 97
 		if (
98 98
 			! $this->hide_promo()
99
-			&& ( ! empty( $_GET['post_type'] ) && 'give_forms' === $_GET['post_type'] )
100
-			&& ( ! empty( $_GET['page'] ) && 'give-settings' === $_GET['page'] )
99
+			&& ( ! empty($_GET['post_type']) && 'give_forms' === $_GET['post_type'])
100
+			&& ( ! empty($_GET['page']) && 'give-settings' === $_GET['page'])
101 101
 		) {
102
-			add_action( $this->hook, array( $this, 'promo' ) );
102
+			add_action($this->hook, array($this, 'promo'));
103 103
 		}
104 104
 	}
105 105
 
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 	 * @return bool
113 113
 	 */
114 114
 	private function hide_promo() {
115
-		$hide_promo = Give_Cache::get( 'give_i18n_give_promo_hide', true );
116
-		if ( ! $hide_promo ) {
117
-			if ( filter_input( INPUT_GET, 'remove_i18n_promo', FILTER_VALIDATE_INT ) === 1 ) {
115
+		$hide_promo = Give_Cache::get('give_i18n_give_promo_hide', true);
116
+		if ( ! $hide_promo) {
117
+			if (filter_input(INPUT_GET, 'remove_i18n_promo', FILTER_VALIDATE_INT) === 1) {
118 118
 				// No expiration time, so this would normally not expire, but it wouldn't be copied to other sites etc.
119
-				Give_Cache::set( 'give_i18n_give_promo_hide', true, null, true );
119
+				Give_Cache::set('give_i18n_give_promo_hide', true, null, true);
120 120
 				$hide_promo = true;
121 121
 			}
122 122
 		}
@@ -135,20 +135,20 @@  discard block
 block discarded – undo
135 135
 		$message = false;
136 136
 
137 137
 		// Using a translation less than 90% complete.
138
-		if ( $this->translation_exists && $this->translation_loaded && $this->percent_translated < 90 ) {
139
-			$message = __( 'As you can see, there is a translation of this plugin in %1$s. This translation is currently %3$d%% complete. We need your help to make it complete and to fix any errors. Please register at %4$s to help %5$s to %1$s!', 'give' );
140
-		} elseif ( ! $this->translation_loaded && $this->translation_exists ) {
141
-			$message = __( 'You\'re using WordPress in %1$s. While %2$s has been %3$d%% translated to %1$s, it has not been shipped with the plugin yet. You can help! Register at %4$s to help complete the translation to %1$s!', 'give' );
142
-		} elseif ( ! $this->translation_exists ) {
143
-			$message = __( 'You\'re using WordPress in a language we don\'t support yet. We\'d love for %2$s to be translated in that language too, but unfortunately, it isn\'t right now. You can change that! Register at %4$s to help translate it!', 'give' );
138
+		if ($this->translation_exists && $this->translation_loaded && $this->percent_translated < 90) {
139
+			$message = __('As you can see, there is a translation of this plugin in %1$s. This translation is currently %3$d%% complete. We need your help to make it complete and to fix any errors. Please register at %4$s to help %5$s to %1$s!', 'give');
140
+		} elseif ( ! $this->translation_loaded && $this->translation_exists) {
141
+			$message = __('You\'re using WordPress in %1$s. While %2$s has been %3$d%% translated to %1$s, it has not been shipped with the plugin yet. You can help! Register at %4$s to help complete the translation to %1$s!', 'give');
142
+		} elseif ( ! $this->translation_exists) {
143
+			$message = __('You\'re using WordPress in a language we don\'t support yet. We\'d love for %2$s to be translated in that language too, but unfortunately, it isn\'t right now. You can change that! Register at %4$s to help translate it!', 'give');
144 144
 		}
145 145
 
146 146
 		// Links.
147
-		$registration_link = sprintf( '<a href="%1$s" target="_blank">%2$s</a>', 'https://wordpress.org/support/register.php', esc_html__( 'WordPress.org', 'give' ) );
148
-		$translations_link = sprintf( '<a href="%1$s" target="_blank">%2$s</a>', 'https://translate.wordpress.org/projects/wp-plugins/give', esc_html__( 'complete the translation', 'give' ) );
147
+		$registration_link = sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://wordpress.org/support/register.php', esc_html__('WordPress.org', 'give'));
148
+		$translations_link = sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://translate.wordpress.org/projects/wp-plugins/give', esc_html__('complete the translation', 'give'));
149 149
 
150 150
 		// Message.
151
-		$message = sprintf( $message, $this->locale_name, 'Give', $this->percent_translated, $registration_link, $translations_link );
151
+		$message = sprintf($message, $this->locale_name, 'Give', $this->percent_translated, $registration_link, $translations_link);
152 152
 
153 153
 		return $message;
154 154
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		$this->translation_details();
163 163
 		$message = $this->promo_message();
164 164
 
165
-		if ( $message ) {
165
+		if ($message) {
166 166
 			$this->print_css();
167 167
 
168 168
 			ob_start();
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
 				                                                                                                                             style="font-size: 110px; text-decoration: none;"></span></a>
174 174
 
175 175
 				<div class="give-i18n-notice-content">
176
-					<a href="<?php echo esc_url( add_query_arg( array( 'remove_i18n_promo' => '1' ) ) ); ?>" class="dismiss"><span class="dashicons dashicons-dismiss"></span></a>
176
+					<a href="<?php echo esc_url(add_query_arg(array('remove_i18n_promo' => '1'))); ?>" class="dismiss"><span class="dashicons dashicons-dismiss"></span></a>
177 177
 
178
-					<h2 style="margin: 10px 0;"><?php printf( esc_html__( 'Help Translate Give to %s', 'give' ), $this->locale_name ); ?></h2>
178
+					<h2 style="margin: 10px 0;"><?php printf(esc_html__('Help Translate Give to %s', 'give'), $this->locale_name); ?></h2>
179 179
 					<p><?php echo $message; ?></p>
180 180
 					<p>
181
-						<a href="https://wordpress.org/support/register.php" target="_blank"><?php _e( 'Register now &raquo;', 'give' ); ?></a>
181
+						<a href="https://wordpress.org/support/register.php" target="_blank"><?php _e('Register now &raquo;', 'give'); ?></a>
182 182
 					</p>
183 183
 				</div>
184 184
 			</div>
@@ -187,12 +187,12 @@  discard block
 block discarded – undo
187 187
 			$notice_html = ob_get_clean();
188 188
 
189 189
 			// Register notice.
190
-			Give()->notices->register_notice( array(
190
+			Give()->notices->register_notice(array(
191 191
 				'id'          => 'give-i18n-notice',
192 192
 				'type'        => 'updated',
193 193
 				'description_html' => $notice_html,
194 194
 				'show'        => true,
195
-			) );
195
+			));
196 196
 		}
197 197
 	}
198 198
 
@@ -274,11 +274,11 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	private function find_or_initialize_translation_details() {
276 276
 
277
-		$set = Give_Cache::get( "give_i18n_give_{$this->locale}", true );
277
+		$set = Give_Cache::get("give_i18n_give_{$this->locale}", true);
278 278
 
279
-		if ( ! $set ) {
279
+		if ( ! $set) {
280 280
 			$set = $this->retrieve_translation_details();
281
-			Give_Cache::set( "give_i18n_give_{$this->locale}", $set, DAY_IN_SECONDS, true );
281
+			Give_Cache::set("give_i18n_give_{$this->locale}", $set, DAY_IN_SECONDS, true);
282 282
 		}
283 283
 
284 284
 		return $set;
@@ -292,10 +292,10 @@  discard block
 block discarded – undo
292 292
 	private function translation_details() {
293 293
 		$set = $this->find_or_initialize_translation_details();
294 294
 
295
-		$this->translation_exists = ! is_null( $set );
296
-		$this->translation_loaded = is_textdomain_loaded( 'give' );
295
+		$this->translation_exists = ! is_null($set);
296
+		$this->translation_loaded = is_textdomain_loaded('give');
297 297
 
298
-		$this->parse_translation_set( $set );
298
+		$this->parse_translation_set($set);
299 299
 	}
300 300
 
301 301
 	/**
@@ -307,26 +307,26 @@  discard block
 block discarded – undo
307 307
 	 */
308 308
 	private function retrieve_translation_details() {
309 309
 
310
-		$api_url = trailingslashit( $this->glotpress_url );
310
+		$api_url = trailingslashit($this->glotpress_url);
311 311
 
312
-		$resp = wp_remote_get( $api_url );
312
+		$resp = wp_remote_get($api_url);
313 313
 
314
-		if ( is_wp_error( $resp ) || wp_remote_retrieve_response_code( $resp ) === '404' ) {
314
+		if (is_wp_error($resp) || wp_remote_retrieve_response_code($resp) === '404') {
315 315
 			return null;
316 316
 		}
317 317
 
318
-		$body = wp_remote_retrieve_body( $resp );
319
-		unset( $resp );
318
+		$body = wp_remote_retrieve_body($resp);
319
+		unset($resp);
320 320
 
321
-		if ( $body ) {
322
-			$body = json_decode( $body );
321
+		if ($body) {
322
+			$body = json_decode($body);
323 323
 
324
-			foreach ( $body->translation_sets as $set ) {
325
-				if ( ! property_exists( $set, 'wp_locale' ) ) {
324
+			foreach ($body->translation_sets as $set) {
325
+				if ( ! property_exists($set, 'wp_locale')) {
326 326
 					continue;
327 327
 				}
328 328
 
329
-				if ( $this->locale == $set->wp_locale ) {
329
+				if ($this->locale == $set->wp_locale) {
330 330
 					return $set;
331 331
 				}
332 332
 			}
@@ -342,8 +342,8 @@  discard block
 block discarded – undo
342 342
 	 *
343 343
 	 * @access private
344 344
 	 */
345
-	private function parse_translation_set( $set ) {
346
-		if ( $this->translation_exists && is_object( $set ) ) {
345
+	private function parse_translation_set($set) {
346
+		if ($this->translation_exists && is_object($set)) {
347 347
 			$this->locale_name        = $set->name;
348 348
 			$this->percent_translated = $set->percent_translated;
349 349
 		} else {
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 	}
354 354
 }
355 355
 
356
-$give_i18n = new Give_i18n_Banner( array(
356
+$give_i18n = new Give_i18n_Banner(array(
357 357
 		'hook'          => 'admin_notices',
358 358
 		'glotpress_url' => 'https://translate.wordpress.org/api/projects/wp-plugins/give/stable/',
359
-	) );
359
+	));
Please login to merge, or discard this patch.
includes/country-functions.php 1 patch
Spacing   +1066 added lines, -1066 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function give_get_country() {
24 24
 	$give_options = give_get_settings();
25
-	$country      = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US';
25
+	$country      = isset($give_options['base_country']) ? $give_options['base_country'] : 'US';
26 26
 
27
-	return apply_filters( 'give_give_country', $country );
27
+	return apply_filters('give_give_country', $country);
28 28
 }
29 29
 
30 30
 /**
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
  */
36 36
 function give_get_state() {
37 37
 	$give_options = give_get_settings();
38
-	$state        = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false;
38
+	$state        = isset($give_options['base_state']) ? $give_options['base_state'] : false;
39 39
 
40
-	return apply_filters( 'give_give_state', $state );
40
+	return apply_filters('give_give_state', $state);
41 41
 }
42 42
 
43 43
 /**
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
  *
50 50
  * @return mixed  A list of states for the site's base country.
51 51
  */
52
-function give_get_states( $country = null ) {
52
+function give_get_states($country = null) {
53 53
 	// If Country have no states return empty array.
54 54
 	$states = array();
55 55
 
56 56
 	// Check if Country Code is empty or not.
57
-	if ( empty( $country ) ) {
57
+	if (empty($country)) {
58 58
 		// Get defalut country code that is being set by the admin.
59 59
 		$country = give_get_country();
60 60
 	}
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 	$states_list = give_states_list();
64 64
 
65 65
 	// Check if $country code exists in the array key.
66
-	if ( array_key_exists( $country, $states_list ) ) {
67
-		$states = $states_list[ $country ];
66
+	if (array_key_exists($country, $states_list)) {
67
+		$states = $states_list[$country];
68 68
 	}
69 69
 
70 70
 	/**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @param string $query Database count query
74 74
 	 */
75
-	return (array) apply_filters( 'give_give_states', $states );
75
+	return (array) apply_filters('give_give_states', $states);
76 76
 }
77 77
 
78 78
 /**
@@ -84,253 +84,253 @@  discard block
 block discarded – undo
84 84
 function give_get_country_list() {
85 85
 	$countries = array(
86 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' ),
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 331
 	);
332 332
 
333
-	return (array) apply_filters( 'give_countries', $countries );
333
+	return (array) apply_filters('give_countries', $countries);
334 334
 }
335 335
 
336 336
 /**
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 	 *
385 385
 	 * @param array $states Contain the list of states in array key format where key of the array is there respected country code.
386 386
 	 */
387
-	return (array) apply_filters( 'give_states_list', $states );
387
+	return (array) apply_filters('give_states_list', $states);
388 388
 }
389 389
 
390 390
 /**
@@ -399,9 +399,9 @@  discard block
 block discarded – undo
399 399
 function give_no_states_country_list() {
400 400
 	$country_list = array();
401 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'];
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 405
 		}
406 406
 	}
407 407
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	 *
413 413
 	 * @param array $country Contain key as there country code & value as there country name.
414 414
 	 */
415
-	return (array) apply_filters( 'give_no_states_country_list', $country_list );
415
+	return (array) apply_filters('give_no_states_country_list', $country_list);
416 416
 }
417 417
 
418 418
 /**
@@ -427,9 +427,9 @@  discard block
 block discarded – undo
427 427
 function give_states_not_required_country_list() {
428 428
 	$country_list = array();
429 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'];
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 433
 		}
434 434
 	}
435 435
 
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 	 *
441 441
 	 * @param array $country Contain key as there country code & value as there country name.
442 442
 	 */
443
-	return (array) apply_filters( 'give_states_not_required_country_list', $country_list );
443
+	return (array) apply_filters('give_states_not_required_country_list', $country_list);
444 444
 }
445 445
 
446 446
 /**
@@ -452,11 +452,11 @@  discard block
 block discarded – undo
452 452
  *
453 453
  * @return string|bool
454 454
  */
455
-function give_get_country_name_by_key( $key ) {
455
+function give_get_country_name_by_key($key) {
456 456
 	$country_list = give_get_country_list();
457 457
 
458
-	if ( array_key_exists( $key, $country_list ) ) {
459
-		return $country_list[ $key ];
458
+	if (array_key_exists($key, $country_list)) {
459
+		return $country_list[$key];
460 460
 	}
461 461
 
462 462
 	return false;
@@ -471,14 +471,14 @@  discard block
 block discarded – undo
471 471
  */
472 472
 function give_get_states_label() {
473 473
 	$country_states_label = array();
474
-	$default_label        = __( 'State', 'give' );
474
+	$default_label        = __('State', 'give');
475 475
 	$locale               = give_get_country_locale();
476
-	foreach ( $locale as $key => $value ) {
476
+	foreach ($locale as $key => $value) {
477 477
 		$label = $default_label;
478
-		if ( ! empty( $value['state'] ) && ! empty( $value['state']['label'] ) ) {
478
+		if ( ! empty($value['state']) && ! empty($value['state']['label'])) {
479 479
 			$label = $value['state']['label'];
480 480
 		}
481
-		$country_states_label[ $key ] = $label;
481
+		$country_states_label[$key] = $label;
482 482
 	}
483 483
 
484 484
 	/**
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 	 *
489 489
 	 * @param array $country Contain key as there country code & value as there country name.
490 490
 	 */
491
-	return (array) apply_filters( 'give_get_states_label', $country_states_label );
491
+	return (array) apply_filters('give_get_states_label', $country_states_label);
492 492
 }
493 493
 
494 494
 /**
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
  * @return array
500 500
  */
501 501
 function give_get_country_locale() {
502
-	return (array) apply_filters( 'give_get_country_locale', array(
502
+	return (array) apply_filters('give_get_country_locale', array(
503 503
 		'AE' => array(
504 504
 			'state' => array(
505 505
 				'required' => false,
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 		),
520 520
 		'AU' => array(
521 521
 			'state' => array(
522
-				'label' => __( 'State', 'give' ),
522
+				'label' => __('State', 'give'),
523 523
 			),
524 524
 		),
525 525
 		'AX' => array(
@@ -529,13 +529,13 @@  discard block
 block discarded – undo
529 529
 		),
530 530
 		'BD' => array(
531 531
 			'state' => array(
532
-				'label' => __( 'District', 'give' ),
532
+				'label' => __('District', 'give'),
533 533
 			),
534 534
 		),
535 535
 		'BE' => array(
536 536
 			'state' => array(
537 537
 				'required' => false,
538
-				'label'    => __( 'Province', 'give' ),
538
+				'label'    => __('Province', 'give'),
539 539
 				'hidden'   => true,
540 540
 			),
541 541
 		),
@@ -546,24 +546,24 @@  discard block
 block discarded – undo
546 546
 		),
547 547
 		'CA' => array(
548 548
 			'state' => array(
549
-				'label' => __( 'Province', 'give' ),
549
+				'label' => __('Province', 'give'),
550 550
 			),
551 551
 		),
552 552
 		'CH' => array(
553 553
 			'state' => array(
554
-				'label'    => __( 'Canton', 'give' ),
554
+				'label'    => __('Canton', 'give'),
555 555
 				'required' => false,
556 556
 				'hidden'   => true,
557 557
 			),
558 558
 		),
559 559
 		'CL' => array(
560 560
 			'state' => array(
561
-				'label' => __( 'Region', 'give' ),
561
+				'label' => __('Region', 'give'),
562 562
 			),
563 563
 		),
564 564
 		'CN' => array(
565 565
 			'state' => array(
566
-				'label' => __( 'Province', 'give' ),
566
+				'label' => __('Province', 'give'),
567 567
 			),
568 568
 		),
569 569
 		'CZ' => array(
@@ -614,23 +614,23 @@  discard block
 block discarded – undo
614 614
 		),
615 615
 		'HK' => array(
616 616
 			'state' => array(
617
-				'label' => __( 'Region', 'give' ),
617
+				'label' => __('Region', 'give'),
618 618
 			),
619 619
 		),
620 620
 		'HU' => array(
621 621
 			'state' => array(
622
-				'label'  => __( 'County', 'give' ),
622
+				'label'  => __('County', 'give'),
623 623
 				'hidden' => true,
624 624
 			),
625 625
 		),
626 626
 		'ID' => array(
627 627
 			'state' => array(
628
-				'label' => __( 'Province', 'give' ),
628
+				'label' => __('Province', 'give'),
629 629
 			),
630 630
 		),
631 631
 		'IE' => array(
632 632
 			'state' => array(
633
-				'label' => __( 'County', 'give' ),
633
+				'label' => __('County', 'give'),
634 634
 			),
635 635
 		),
636 636
 		'IS' => array(
@@ -647,12 +647,12 @@  discard block
 block discarded – undo
647 647
 		'IT' => array(
648 648
 			'state' => array(
649 649
 				'required' => true,
650
-				'label'    => __( 'Province', 'give' ),
650
+				'label'    => __('Province', 'give'),
651 651
 			),
652 652
 		),
653 653
 		'JP' => array(
654 654
 			'state' => array(
655
-				'label' => __( 'Prefecture', 'give' ),
655
+				'label' => __('Prefecture', 'give'),
656 656
 			),
657 657
 		),
658 658
 		'KR' => array(
@@ -678,13 +678,13 @@  discard block
 block discarded – undo
678 678
 		'NL' => array(
679 679
 			'state' => array(
680 680
 				'required' => false,
681
-				'label'    => __( 'Province', 'give' ),
681
+				'label'    => __('Province', 'give'),
682 682
 				'hidden'   => true,
683 683
 			),
684 684
 		),
685 685
 		'NZ' => array(
686 686
 			'state' => array(
687
-				'label'    => __( 'Region', 'give' ),
687
+				'label'    => __('Region', 'give'),
688 688
 			),
689 689
 		),
690 690
 		'NO' => array(
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 		),
696 696
 		'NP' => array(
697 697
 			'state' => array(
698
-				'label' => __( 'State / Zone', 'give' ),
698
+				'label' => __('State / Zone', 'give'),
699 699
 			),
700 700
 		),
701 701
 		'PL' => array(
@@ -739,12 +739,12 @@  discard block
 block discarded – undo
739 739
 		),
740 740
 		'ES' => array(
741 741
 			'state' => array(
742
-				'label' => __( 'Province', 'give' ),
742
+				'label' => __('Province', 'give'),
743 743
 			),
744 744
 		),
745 745
 		'LI' => array(
746 746
 			'state' => array(
747
-				'label'    => __( 'Municipality', 'give' ),
747
+				'label'    => __('Municipality', 'give'),
748 748
 				'required' => false,
749 749
 				'hidden'   => true,
750 750
 			),
@@ -762,17 +762,17 @@  discard block
 block discarded – undo
762 762
 		),
763 763
 		'TR' => array(
764 764
 			'state' => array(
765
-				'label' => __( 'Province', 'give' ),
765
+				'label' => __('Province', 'give'),
766 766
 			),
767 767
 		),
768 768
 		'US' => array(
769 769
 			'state' => array(
770
-				'label' => __( 'State', 'give' ),
770
+				'label' => __('State', 'give'),
771 771
 			),
772 772
 		),
773 773
 		'GB' => array(
774 774
 			'state' => array(
775
-				'label'    => __( 'County', 'give' ),
775
+				'label'    => __('County', 'give'),
776 776
 				'required' => false,
777 777
 			),
778 778
 		),
@@ -789,10 +789,10 @@  discard block
 block discarded – undo
789 789
 		),
790 790
 		'ZA' => array(
791 791
 			'state' => array(
792
-				'label' => __( 'Province', 'give' ),
792
+				'label' => __('Province', 'give'),
793 793
 			),
794 794
 		),
795
-	) );
795
+	));
796 796
 }
797 797
 
798 798
 /**
@@ -804,90 +804,90 @@  discard block
 block discarded – undo
804 804
 function give_get_turkey_states_list() {
805 805
 	$states = array(
806 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' ),
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 888
 	);
889 889
 
890
-	return apply_filters( 'give_turkey_states', $states );
890
+	return apply_filters('give_turkey_states', $states);
891 891
 }
892 892
 
893 893
 /**
@@ -899,51 +899,51 @@  discard block
 block discarded – undo
899 899
 function give_get_romania_states_list() {
900 900
 	$states = array(
901 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' ),
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 944
 	);
945 945
 
946
-	return apply_filters( 'give_romania_states', $states );
946
+	return apply_filters('give_romania_states', $states);
947 947
 }
948 948
 
949 949
 /**
@@ -955,17 +955,17 @@  discard block
 block discarded – undo
955 955
 function give_get_pakistan_states_list() {
956 956
 	$states = array(
957 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' ),
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 966
 	);
967 967
 
968
-	return apply_filters( 'give_pakistan_states', $states );
968
+	return apply_filters('give_pakistan_states', $states);
969 969
 }
970 970
 
971 971
 /**
@@ -977,91 +977,91 @@  discard block
 block discarded – undo
977 977
 function give_get_philippines_states_list() {
978 978
 	$states = array(
979 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' ),
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 1062
 	);
1063 1063
 
1064
-	return apply_filters( 'give_philippines_states', $states );
1064
+	return apply_filters('give_philippines_states', $states);
1065 1065
 }
1066 1066
 
1067 1067
 /**
@@ -1073,35 +1073,35 @@  discard block
 block discarded – undo
1073 1073
 function give_get_peru_states_list() {
1074 1074
 	$states = array(
1075 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' ),
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 1102
 	);
1103 1103
 
1104
-	return apply_filters( 'give_peru_states', $states );
1104
+	return apply_filters('give_peru_states', $states);
1105 1105
 }
1106 1106
 
1107 1107
 /**
@@ -1113,23 +1113,23 @@  discard block
 block discarded – undo
1113 1113
 function give_get_nepal_states_list() {
1114 1114
 	$states = array(
1115 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' ),
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 1130
 	);
1131 1131
 
1132
-	return apply_filters( 'give_nepal_states', $states );
1132
+	return apply_filters('give_nepal_states', $states);
1133 1133
 }
1134 1134
 
1135 1135
 /**
@@ -1141,46 +1141,46 @@  discard block
 block discarded – undo
1141 1141
 function give_get_nigerian_states_list() {
1142 1142
 	$states = array(
1143 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' ),
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 1181
 	);
1182 1182
 
1183
-	return apply_filters( 'give_nigerian_states', $states );
1183
+	return apply_filters('give_nigerian_states', $states);
1184 1184
 }
1185 1185
 
1186 1186
 /**
@@ -1192,41 +1192,41 @@  discard block
 block discarded – undo
1192 1192
 function give_get_mexico_states_list() {
1193 1193
 	$states = array(
1194 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' ),
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 1227
 	);
1228 1228
 
1229
-	return apply_filters( 'give_mexico_states', $states );
1229
+	return apply_filters('give_mexico_states', $states);
1230 1230
 }
1231 1231
 
1232 1232
 /**
@@ -1238,56 +1238,56 @@  discard block
 block discarded – undo
1238 1238
 function give_get_japan_states_list() {
1239 1239
 	$states = array(
1240 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' ),
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 1288
 	);
1289 1289
 
1290
-	return apply_filters( 'give_japan_states', $states );
1290
+	return apply_filters('give_japan_states', $states);
1291 1291
 }
1292 1292
 
1293 1293
 /**
@@ -1299,119 +1299,119 @@  discard block
 block discarded – undo
1299 1299
 function give_get_italy_states_list() {
1300 1300
 	$states = array(
1301 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' ),
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 1412
 	);
1413 1413
 
1414
-	return apply_filters( 'give_italy_states', $states );
1414
+	return apply_filters('give_italy_states', $states);
1415 1415
 }
1416 1416
 
1417 1417
 /**
@@ -1423,40 +1423,40 @@  discard block
 block discarded – undo
1423 1423
 function give_get_iran_states_list() {
1424 1424
 	$states = array(
1425 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' ),
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 1457
 	);
1458 1458
 
1459
-	return apply_filters( 'give_iran_states', $states );
1459
+	return apply_filters('give_iran_states', $states);
1460 1460
 }
1461 1461
 
1462 1462
 /**
@@ -1468,35 +1468,35 @@  discard block
 block discarded – undo
1468 1468
 function give_get_ireland_states_list() {
1469 1469
 	$states = array(
1470 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' ),
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 1497
 	);
1498 1498
 
1499
-	return apply_filters( 'give_ireland_states', $states );
1499
+	return apply_filters('give_ireland_states', $states);
1500 1500
 }
1501 1501
 
1502 1502
 /**
@@ -1508,22 +1508,22 @@  discard block
 block discarded – undo
1508 1508
 function give_get_greek_states_list() {
1509 1509
 	$states = array(
1510 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' ),
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 1524
 	);
1525 1525
 
1526
-	return apply_filters( 'give_greek_states', $states );
1526
+	return apply_filters('give_greek_states', $states);
1527 1527
 }
1528 1528
 
1529 1529
 /**
@@ -1535,18 +1535,18 @@  discard block
 block discarded – undo
1535 1535
 function give_get_bolivian_states_list() {
1536 1536
 	$states = array(
1537 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' ),
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 1547
 	);
1548 1548
 
1549
-	return apply_filters( 'give_bolivian_states', $states );
1549
+	return apply_filters('give_bolivian_states', $states);
1550 1550
 }
1551 1551
 
1552 1552
 /**
@@ -1558,37 +1558,37 @@  discard block
 block discarded – undo
1558 1558
 function give_get_bulgarian_states_list() {
1559 1559
 	$states = array(
1560 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' ),
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 1589
 	);
1590 1590
 
1591
-	return apply_filters( 'give_bulgarian_states', $states );
1591
+	return apply_filters('give_bulgarian_states', $states);
1592 1592
 }
1593 1593
 
1594 1594
 /**
@@ -1600,73 +1600,73 @@  discard block
 block discarded – undo
1600 1600
 function give_get_bangladeshi_states_list() {
1601 1601
 	$states = array(
1602 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' ),
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 1667
 	);
1668 1668
 
1669
-	return apply_filters( 'give_bangladeshi_states', $states );
1669
+	return apply_filters('give_bangladeshi_states', $states);
1670 1670
 }
1671 1671
 
1672 1672
 /**
@@ -1678,33 +1678,33 @@  discard block
 block discarded – undo
1678 1678
 function give_get_argentina_states_list() {
1679 1679
 	$states = array(
1680 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' ),
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 1705
 	);
1706 1706
 
1707
-	return apply_filters( 'give_argentina_states', $states );
1707
+	return apply_filters('give_argentina_states', $states);
1708 1708
 }
1709 1709
 
1710 1710
 /**
@@ -1785,7 +1785,7 @@  discard block
 block discarded – undo
1785 1785
 		'AP' => 'Armed Forces - Pacific',
1786 1786
 	);
1787 1787
 
1788
-	return apply_filters( 'give_us_states', $states );
1788
+	return apply_filters('give_us_states', $states);
1789 1789
 }
1790 1790
 
1791 1791
 /**
@@ -1798,22 +1798,22 @@  discard block
 block discarded – undo
1798 1798
 function give_get_provinces_list() {
1799 1799
 	$provinces = array(
1800 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' ),
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 1814
 	);
1815 1815
 
1816
-	return apply_filters( 'give_canada_provinces', $provinces );
1816
+	return apply_filters('give_canada_provinces', $provinces);
1817 1817
 }
1818 1818
 
1819 1819
 /**
@@ -1835,7 +1835,7 @@  discard block
 block discarded – undo
1835 1835
 		'WA'  => 'Western Australia',
1836 1836
 	);
1837 1837
 
1838
-	return apply_filters( 'give_australian_states', $states );
1838
+	return apply_filters('give_australian_states', $states);
1839 1839
 }
1840 1840
 
1841 1841
 /**
@@ -1876,7 +1876,7 @@  discard block
 block discarded – undo
1876 1876
 		'TO' => 'Tocantins',
1877 1877
 	);
1878 1878
 
1879
-	return apply_filters( 'give_brazil_states', $states );
1879
+	return apply_filters('give_brazil_states', $states);
1880 1880
 }
1881 1881
 
1882 1882
 /**
@@ -1893,7 +1893,7 @@  discard block
 block discarded – undo
1893 1893
 		'NEW TERRITORIES' => 'New Territories',
1894 1894
 	);
1895 1895
 
1896
-	return apply_filters( 'give_hong_kong_states', $states );
1896
+	return apply_filters('give_hong_kong_states', $states);
1897 1897
 }
1898 1898
 
1899 1899
 /**
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
 		'ZA' => 'Zala',
1928 1928
 	);
1929 1929
 
1930
-	return apply_filters( 'give_hungary_states', $states );
1930
+	return apply_filters('give_hungary_states', $states);
1931 1931
 }
1932 1932
 
1933 1933
 /**
@@ -1973,7 +1973,7 @@  discard block
 block discarded – undo
1973 1973
 		'CN32' => 'Xinjiang / &#26032;&#30086;',
1974 1974
 	);
1975 1975
 
1976
-	return apply_filters( 'give_chinese_states', $states );
1976
+	return apply_filters('give_chinese_states', $states);
1977 1977
 }
1978 1978
 
1979 1979
 /**
@@ -2002,7 +2002,7 @@  discard block
 block discarded – undo
2002 2002
 		'WC' => 'West Coast',
2003 2003
 	);
2004 2004
 
2005
-	return apply_filters( 'give_new_zealand_states', $states );
2005
+	return apply_filters('give_new_zealand_states', $states);
2006 2006
 }
2007 2007
 
2008 2008
 /**
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
 		'PB' => 'Papua Barat',
2051 2051
 	);
2052 2052
 
2053
-	return apply_filters( 'give_indonesia_states', $states );
2053
+	return apply_filters('give_indonesia_states', $states);
2054 2054
 }
2055 2055
 
2056 2056
 /**
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
 		'PY' => 'Pondicherry (Puducherry)',
2101 2101
 	);
2102 2102
 
2103
-	return apply_filters( 'give_indian_states', $states );
2103
+	return apply_filters('give_indian_states', $states);
2104 2104
 }
2105 2105
 
2106 2106
 /**
@@ -2130,7 +2130,7 @@  discard block
 block discarded – undo
2130 2130
 		'PJY' => 'W.P. Putrajaya',
2131 2131
 	);
2132 2132
 
2133
-	return apply_filters( 'give_malaysian_states', $states );
2133
+	return apply_filters('give_malaysian_states', $states);
2134 2134
 }
2135 2135
 
2136 2136
 /**
@@ -2153,7 +2153,7 @@  discard block
 block discarded – undo
2153 2153
 		'WC'  => 'Western Cape',
2154 2154
 	);
2155 2155
 
2156
-	return apply_filters( 'give_south_african_states', $states );
2156
+	return apply_filters('give_south_african_states', $states);
2157 2157
 }
2158 2158
 
2159 2159
 /**
@@ -2244,7 +2244,7 @@  discard block
 block discarded – undo
2244 2244
 		'TH-35' => 'Yasothon (&#3618;&#3650;&#3626;&#3608;&#3619;)',
2245 2245
 	);
2246 2246
 
2247
-	return apply_filters( 'give_thailand_states', $states );
2247
+	return apply_filters('give_thailand_states', $states);
2248 2248
 }
2249 2249
 
2250 2250
 /**
@@ -2256,59 +2256,59 @@  discard block
 block discarded – undo
2256 2256
 function give_get_spain_states_list() {
2257 2257
 	$states = array(
2258 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' ),
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 2311
 	);
2312 2312
 
2313
-	return apply_filters( 'give_spain_states', $states );
2313
+	return apply_filters('give_spain_states', $states);
2314 2314
 }
Please login to merge, or discard this patch.
includes/ajax-functions.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -521,7 +521,7 @@
 block discarded – undo
521 521
  *
522 522
  * @since 1.8.17
523 523
  *
524
- * @return bool
524
+ * @return false|null
525 525
  */
526 526
 function give_confirm_email_for_donation_access() {
527 527
 
Please login to merge, or discard this patch.
Spacing   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly.
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
@@ -26,31 +26,31 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function give_test_ajax_works() {
28 28
 	// Handle ajax.
29
-	if ( doing_action( 'wp_ajax_nopriv_give_test_ajax' ) ) {
30
-		wp_die( 0, 200 );
29
+	if (doing_action('wp_ajax_nopriv_give_test_ajax')) {
30
+		wp_die(0, 200);
31 31
 	}
32 32
 
33 33
 	// Check if the Airplane Mode plugin is installed.
34
-	if ( class_exists( 'Airplane_Mode_Core' ) ) {
34
+	if (class_exists('Airplane_Mode_Core')) {
35 35
 
36 36
 		$airplane = Airplane_Mode_Core::getInstance();
37 37
 
38
-		if ( method_exists( $airplane, 'enabled' ) ) {
38
+		if (method_exists($airplane, 'enabled')) {
39 39
 
40
-			if ( $airplane->enabled() ) {
40
+			if ($airplane->enabled()) {
41 41
 				return true;
42 42
 			}
43 43
 		} else {
44 44
 
45
-			if ( 'on' === $airplane->check_status() ) {
45
+			if ('on' === $airplane->check_status()) {
46 46
 				return true;
47 47
 			}
48 48
 		}
49 49
 	}
50 50
 
51
-	add_filter( 'block_local_requests', '__return_false' );
51
+	add_filter('block_local_requests', '__return_false');
52 52
 
53
-	if ( Give_Cache::get( '_give_ajax_works', true ) ) {
53
+	if (Give_Cache::get('_give_ajax_works', true)) {
54 54
 		return true;
55 55
 	}
56 56
 
@@ -62,41 +62,41 @@  discard block
 block discarded – undo
62 62
 		),
63 63
 	);
64 64
 
65
-	$ajax = wp_remote_post( give_get_ajax_url(), $params );
65
+	$ajax = wp_remote_post(give_get_ajax_url(), $params);
66 66
 
67 67
 	$works = true;
68 68
 
69
-	if ( is_wp_error( $ajax ) ) {
69
+	if (is_wp_error($ajax)) {
70 70
 
71 71
 		$works = false;
72 72
 
73 73
 	} else {
74 74
 
75
-		if ( empty( $ajax['response'] ) ) {
75
+		if (empty($ajax['response'])) {
76 76
 			$works = false;
77 77
 		}
78 78
 
79
-		if ( empty( $ajax['response']['code'] ) || 200 !== (int) $ajax['response']['code'] ) {
79
+		if (empty($ajax['response']['code']) || 200 !== (int) $ajax['response']['code']) {
80 80
 			$works = false;
81 81
 		}
82 82
 
83
-		if ( empty( $ajax['response']['message'] ) || 'OK' !== $ajax['response']['message'] ) {
83
+		if (empty($ajax['response']['message']) || 'OK' !== $ajax['response']['message']) {
84 84
 			$works = false;
85 85
 		}
86 86
 
87
-		if ( ! isset( $ajax['body'] ) || 0 !== (int) $ajax['body'] ) {
87
+		if ( ! isset($ajax['body']) || 0 !== (int) $ajax['body']) {
88 88
 			$works = false;
89 89
 		}
90 90
 	}
91 91
 
92
-	if ( $works ) {
93
-		Give_Cache::set( '_give_ajax_works', '1', DAY_IN_SECONDS, true );
92
+	if ($works) {
93
+		Give_Cache::set('_give_ajax_works', '1', DAY_IN_SECONDS, true);
94 94
 	}
95 95
 
96
-	return apply_filters( 'give_test_ajax_works', $works );
96
+	return apply_filters('give_test_ajax_works', $works);
97 97
 }
98 98
 
99
-add_action( 'wp_ajax_nopriv_give_test_ajax', 'give_test_ajax_works' );
99
+add_action('wp_ajax_nopriv_give_test_ajax', 'give_test_ajax_works');
100 100
 
101 101
 /**
102 102
  * Get AJAX URL
@@ -107,21 +107,21 @@  discard block
 block discarded – undo
107 107
  *
108 108
  * @return string
109 109
  */
110
-function give_get_ajax_url( $query = array() ) {
111
-	$scheme = defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN ? 'https' : 'admin';
110
+function give_get_ajax_url($query = array()) {
111
+	$scheme = defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ? 'https' : 'admin';
112 112
 
113 113
 	$current_url = give_get_current_page_url();
114
-	$ajax_url    = admin_url( 'admin-ajax.php', $scheme );
114
+	$ajax_url    = admin_url('admin-ajax.php', $scheme);
115 115
 
116
-	if ( preg_match( '/^https/', $current_url ) && ! preg_match( '/^https/', $ajax_url ) ) {
117
-		$ajax_url = preg_replace( '/^http/', 'https', $ajax_url );
116
+	if (preg_match('/^https/', $current_url) && ! preg_match('/^https/', $ajax_url)) {
117
+		$ajax_url = preg_replace('/^http/', 'https', $ajax_url);
118 118
 	}
119 119
 
120
-	if ( ! empty( $query ) ) {
121
-		$ajax_url = add_query_arg( $query, $ajax_url );
120
+	if ( ! empty($query)) {
121
+		$ajax_url = add_query_arg($query, $ajax_url);
122 122
 	}
123 123
 
124
-	return apply_filters( 'give_ajax_url', $ajax_url );
124
+	return apply_filters('give_ajax_url', $ajax_url);
125 125
 }
126 126
 
127 127
 /**
@@ -137,12 +137,12 @@  discard block
 block discarded – undo
137 137
 	 *
138 138
 	 * @since 1.7
139 139
 	 */
140
-	do_action( 'give_donation_form_login_fields' );
140
+	do_action('give_donation_form_login_fields');
141 141
 
142 142
 	give_die();
143 143
 }
144 144
 
145
-add_action( 'wp_ajax_nopriv_give_checkout_login', 'give_load_checkout_login_fields' );
145
+add_action('wp_ajax_nopriv_give_checkout_login', 'give_load_checkout_login_fields');
146 146
 
147 147
 /**
148 148
  * Load Checkout Fields
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
  * @return void
153 153
  */
154 154
 function give_load_checkout_fields() {
155
-	$form_id = isset( $_POST['form_id'] ) ? $_POST['form_id'] : '';
155
+	$form_id = isset($_POST['form_id']) ? $_POST['form_id'] : '';
156 156
 
157 157
 	ob_start();
158 158
 
@@ -161,18 +161,18 @@  discard block
 block discarded – undo
161 161
 	 *
162 162
 	 * @since 1.7
163 163
 	 */
164
-	do_action( 'give_donation_form_register_login_fields', $form_id );
164
+	do_action('give_donation_form_register_login_fields', $form_id);
165 165
 
166 166
 	$fields = ob_get_clean();
167 167
 
168
-	wp_send_json( array(
169
-		'fields' => wp_json_encode( $fields ),
170
-		'submit' => wp_json_encode( give_get_donation_form_submit_button( $form_id ) ),
171
-	) );
168
+	wp_send_json(array(
169
+		'fields' => wp_json_encode($fields),
170
+		'submit' => wp_json_encode(give_get_donation_form_submit_button($form_id)),
171
+	));
172 172
 }
173 173
 
174
-add_action( 'wp_ajax_nopriv_give_cancel_login', 'give_load_checkout_fields' );
175
-add_action( 'wp_ajax_nopriv_give_checkout_register', 'give_load_checkout_fields' );
174
+add_action('wp_ajax_nopriv_give_cancel_login', 'give_load_checkout_fields');
175
+add_action('wp_ajax_nopriv_give_checkout_register', 'give_load_checkout_fields');
176 176
 
177 177
 /**
178 178
  * Get Form Title via AJAX (used only in WordPress Admin)
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
  * @return void
183 183
  */
184 184
 function give_ajax_get_form_title() {
185
-	if ( isset( $_POST['form_id'] ) ) {
186
-		$title = get_the_title( $_POST['form_id'] );
187
-		if ( $title ) {
185
+	if (isset($_POST['form_id'])) {
186
+		$title = get_the_title($_POST['form_id']);
187
+		if ($title) {
188 188
 			echo $title;
189 189
 		} else {
190 190
 			echo 'fail';
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
 	give_die();
194 194
 }
195 195
 
196
-add_action( 'wp_ajax_give_get_form_title', 'give_ajax_get_form_title' );
197
-add_action( 'wp_ajax_nopriv_give_get_form_title', 'give_ajax_get_form_title' );
196
+add_action('wp_ajax_give_get_form_title', 'give_ajax_get_form_title');
197
+add_action('wp_ajax_nopriv_give_get_form_title', 'give_ajax_get_form_title');
198 198
 
199 199
 /**
200 200
  * Retrieve a states drop down
@@ -208,41 +208,41 @@  discard block
 block discarded – undo
208 208
 	$show_field     = true;
209 209
 	$states_require = true;
210 210
 	// Get the Country code from the $_POST.
211
-	$country = sanitize_text_field( $_POST['country'] );
211
+	$country = sanitize_text_field($_POST['country']);
212 212
 
213 213
 	// Get the field name from the $_POST.
214
-	$field_name = sanitize_text_field( $_POST['field_name'] );
214
+	$field_name = sanitize_text_field($_POST['field_name']);
215 215
 
216
-	$label        = __( 'State', 'give' );
216
+	$label        = __('State', 'give');
217 217
 	$states_label = give_get_states_label();
218 218
 
219 219
 	$default_state = '';
220
-	if ( $country === give_get_country() ) {
220
+	if ($country === give_get_country()) {
221 221
 		$default_state = give_get_state();
222 222
 	}
223 223
 
224 224
 	// Check if $country code exists in the array key for states label.
225
-	if ( array_key_exists( $country, $states_label ) ) {
226
-		$label = $states_label[ $country ];
225
+	if (array_key_exists($country, $states_label)) {
226
+		$label = $states_label[$country];
227 227
 	}
228 228
 
229
-	if ( empty( $country ) ) {
229
+	if (empty($country)) {
230 230
 		$country = give_get_country();
231 231
 	}
232 232
 
233
-	$states = give_get_states( $country );
234
-	if ( ! empty( $states ) ) {
235
-		$args         = array(
233
+	$states = give_get_states($country);
234
+	if ( ! empty($states)) {
235
+		$args = array(
236 236
 			'name'             => $field_name,
237 237
 			'id'               => $field_name,
238
-			'class'            => $field_name . '  give-select',
238
+			'class'            => $field_name.'  give-select',
239 239
 			'options'          => $states,
240 240
 			'show_option_all'  => false,
241 241
 			'show_option_none' => false,
242 242
 			'placeholder'      => $label,
243 243
 			'selected'         => $default_state,
244 244
 		);
245
-		$data         = Give()->html->select( $args );
245
+		$data         = Give()->html->select($args);
246 246
 		$states_found = true;
247 247
 	} else {
248 248
 		$data = 'nostates';
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 		$no_states_country = give_no_states_country_list();
252 252
 
253 253
 		// Check if $country code exists in the array key.
254
-		if ( array_key_exists( $country, $no_states_country ) ) {
254
+		if (array_key_exists($country, $no_states_country)) {
255 255
 			$show_field = false;
256 256
 		}
257 257
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 		$states_not_required_country_list = give_states_not_required_country_list();
260 260
 
261 261
 		// Check if $country code exists in the array key.
262
-		if ( array_key_exists( $country, $states_not_required_country_list ) ) {
262
+		if (array_key_exists($country, $states_not_required_country_list)) {
263 263
 			$states_require = false;
264 264
 		}
265 265
 	}
@@ -272,11 +272,11 @@  discard block
 block discarded – undo
272 272
 		'data'           => $data,
273 273
 		'default_state'  => $default_state,
274 274
 	);
275
-	wp_send_json( $response );
275
+	wp_send_json($response);
276 276
 }
277 277
 
278
-add_action( 'wp_ajax_give_get_states', 'give_ajax_get_states_field' );
279
-add_action( 'wp_ajax_nopriv_give_get_states', 'give_ajax_get_states_field' );
278
+add_action('wp_ajax_give_get_states', 'give_ajax_get_states_field');
279
+add_action('wp_ajax_nopriv_give_get_states', 'give_ajax_get_states_field');
280 280
 
281 281
 /**
282 282
  * Retrieve donation forms via AJAX for chosen dropdown search field.
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
  */
288 288
 function give_ajax_form_search() {
289 289
 	$results = array();
290
-	$search  = esc_sql( sanitize_text_field( $_POST['s'] ) );
290
+	$search  = esc_sql(sanitize_text_field($_POST['s']));
291 291
 
292 292
 	$args = array(
293 293
 		'post_type'              => 'give_forms',
@@ -308,12 +308,12 @@  discard block
 block discarded – undo
308 308
 	 *
309 309
 	 * @return array $args Query argument for WP_query
310 310
 	 */
311
-	$args = (array) apply_filters( 'give_ajax_form_search_args', $args );
311
+	$args = (array) apply_filters('give_ajax_form_search_args', $args);
312 312
 
313 313
 	// get all the donation form.
314
-	$query = new WP_Query( $args );
315
-	if ( $query->have_posts() ) {
316
-		while ( $query->have_posts() ) {
314
+	$query = new WP_Query($args);
315
+	if ($query->have_posts()) {
316
+		while ($query->have_posts()) {
317 317
 			$query->the_post();
318 318
 			global $post;
319 319
 
@@ -334,13 +334,13 @@  discard block
 block discarded – undo
334 334
 	 *
335 335
 	 * @return array $results Contain the Donation Form id
336 336
 	 */
337
-	$results = (array) apply_filters( 'give_ajax_form_search_responce', $results );
337
+	$results = (array) apply_filters('give_ajax_form_search_responce', $results);
338 338
 
339
-	wp_send_json( $results );
339
+	wp_send_json($results);
340 340
 }
341 341
 
342
-add_action( 'wp_ajax_give_form_search', 'give_ajax_form_search' );
343
-add_action( 'wp_ajax_nopriv_give_form_search', 'give_ajax_form_search' );
342
+add_action('wp_ajax_give_form_search', 'give_ajax_form_search');
343
+add_action('wp_ajax_nopriv_give_form_search', 'give_ajax_form_search');
344 344
 
345 345
 /**
346 346
  * Search the donors database via Ajax
@@ -352,28 +352,28 @@  discard block
 block discarded – undo
352 352
 function give_ajax_donor_search() {
353 353
 	global $wpdb;
354 354
 
355
-	$search  = esc_sql( sanitize_text_field( $_POST['s'] ) );
355
+	$search  = esc_sql(sanitize_text_field($_POST['s']));
356 356
 	$results = array();
357
-	if ( ! current_user_can( 'view_give_reports' ) ) {
357
+	if ( ! current_user_can('view_give_reports')) {
358 358
 		$donors = array();
359 359
 	} else {
360
-		$donors = $wpdb->get_results( "SELECT id,name,email FROM $wpdb->donors WHERE `name` LIKE '%$search%' OR `email` LIKE '%$search%' LIMIT 50" );
360
+		$donors = $wpdb->get_results("SELECT id,name,email FROM $wpdb->donors WHERE `name` LIKE '%$search%' OR `email` LIKE '%$search%' LIMIT 50");
361 361
 	}
362 362
 
363
-	if ( $donors ) {
364
-		foreach ( $donors as $donor ) {
363
+	if ($donors) {
364
+		foreach ($donors as $donor) {
365 365
 
366 366
 			$results[] = array(
367 367
 				'id'   => $donor->id,
368
-				'name' => $donor->name . ' (' . $donor->email . ')',
368
+				'name' => $donor->name.' ('.$donor->email.')',
369 369
 			);
370 370
 		}
371 371
 	}
372 372
 
373
-	wp_send_json( $results );
373
+	wp_send_json($results);
374 374
 }
375 375
 
376
-add_action( 'wp_ajax_give_donor_search', 'give_ajax_donor_search' );
376
+add_action('wp_ajax_give_donor_search', 'give_ajax_donor_search');
377 377
 
378 378
 
379 379
 /**
@@ -386,37 +386,37 @@  discard block
 block discarded – undo
386 386
 function give_ajax_search_users() {
387 387
 	$results = array();
388 388
 
389
-	if ( current_user_can( 'manage_give_settings' ) ) {
389
+	if (current_user_can('manage_give_settings')) {
390 390
 
391
-		$search = esc_sql( sanitize_text_field( $_POST['s'] ) );
391
+		$search = esc_sql(sanitize_text_field($_POST['s']));
392 392
 
393 393
 		$get_users_args = array(
394 394
 			'number' => 9999,
395
-			'search' => $search . '*',
395
+			'search' => $search.'*',
396 396
 		);
397 397
 
398
-		$get_users_args = apply_filters( 'give_search_users_args', $get_users_args );
398
+		$get_users_args = apply_filters('give_search_users_args', $get_users_args);
399 399
 
400
-		$found_users = apply_filters( 'give_ajax_found_users', get_users( $get_users_args ), $search );
400
+		$found_users = apply_filters('give_ajax_found_users', get_users($get_users_args), $search);
401 401
 		$results     = array();
402 402
 
403
-		if ( $found_users ) {
403
+		if ($found_users) {
404 404
 
405
-			foreach ( $found_users as $user ) {
405
+			foreach ($found_users as $user) {
406 406
 
407 407
 				$results[] = array(
408 408
 					'id'   => $user->ID,
409
-					'name' => esc_html( $user->user_login . ' (' . $user->user_email . ')' ),
409
+					'name' => esc_html($user->user_login.' ('.$user->user_email.')'),
410 410
 				);
411 411
 			}
412 412
 		}
413 413
 	}// End if().
414 414
 
415
-	wp_send_json( $results );
415
+	wp_send_json($results);
416 416
 
417 417
 }
418 418
 
419
-add_action( 'wp_ajax_give_user_search', 'give_ajax_search_users' );
419
+add_action('wp_ajax_give_user_search', 'give_ajax_search_users');
420 420
 
421 421
 
422 422
 /**
@@ -432,14 +432,14 @@  discard block
 block discarded – undo
432 432
 	$data = array();
433 433
 	$args = array(
434 434
 		'post_type' => 'page',
435
-		's'         => give_clean( $_POST['s'] ),
435
+		's'         => give_clean($_POST['s']),
436 436
 	);
437 437
 
438
-	$query = new WP_Query( $args );
438
+	$query = new WP_Query($args);
439 439
 
440 440
 	// Query posts by title.
441
-	if ( $query->have_posts() ) {
442
-		while ( $query->have_posts() ) {
441
+	if ($query->have_posts()) {
442
+		while ($query->have_posts()) {
443 443
 			$query->the_post();
444 444
 
445 445
 			$data[] = array(
@@ -449,10 +449,10 @@  discard block
 block discarded – undo
449 449
 		}
450 450
 	}
451 451
 
452
-	wp_send_json( $data );
452
+	wp_send_json($data);
453 453
 }
454 454
 
455
-add_action( 'wp_ajax_give_pages_search', 'give_ajax_pages_search' );
455
+add_action('wp_ajax_give_pages_search', 'give_ajax_pages_search');
456 456
 
457 457
 /**
458 458
  * Retrieve Categories via AJAX for chosen dropdown search field.
@@ -473,14 +473,14 @@  discard block
 block discarded – undo
473 473
 	 *
474 474
 	 * @return array $args argument for get_terms
475 475
 	 */
476
-	$args = (array) apply_filters( 'give_forms_categories_dropdown_args', array(
476
+	$args = (array) apply_filters('give_forms_categories_dropdown_args', array(
477 477
 		'number'     => 30,
478
-		'name__like' => esc_sql( sanitize_text_field( $_POST['s'] ) )
479
-	) );
478
+		'name__like' => esc_sql(sanitize_text_field($_POST['s']))
479
+	));
480 480
 
481
-	$categories = get_terms( 'give_forms_category', $args );
481
+	$categories = get_terms('give_forms_category', $args);
482 482
 
483
-	foreach ( $categories as $category ) {
483
+	foreach ($categories as $category) {
484 484
 		$results[] = array(
485 485
 			'id'   => $category->term_id,
486 486
 			'name' => $category->name,
@@ -496,12 +496,12 @@  discard block
 block discarded – undo
496 496
 	 *
497 497
 	 * @return array $results Contain the categories id and name
498 498
 	 */
499
-	$results = (array) apply_filters( 'give_forms_categories_dropdown_responce', $results );
499
+	$results = (array) apply_filters('give_forms_categories_dropdown_responce', $results);
500 500
 
501
-	wp_send_json( $results );
501
+	wp_send_json($results);
502 502
 }
503 503
 
504
-add_action( 'wp_ajax_give_categories_search', 'give_ajax_categories_search' );
504
+add_action('wp_ajax_give_categories_search', 'give_ajax_categories_search');
505 505
 
506 506
 /**
507 507
  * Retrieve Tags via AJAX for chosen dropdown search field.
@@ -522,14 +522,14 @@  discard block
 block discarded – undo
522 522
 	 *
523 523
 	 * @return array $args argument for get_terms
524 524
 	 */
525
-	$args = (array) apply_filters( 'give_forms_tags_dropdown_args', array(
525
+	$args = (array) apply_filters('give_forms_tags_dropdown_args', array(
526 526
 		'number'     => 30,
527
-		'name__like' => esc_sql( sanitize_text_field( $_POST['s'] ) )
528
-	) );
527
+		'name__like' => esc_sql(sanitize_text_field($_POST['s']))
528
+	));
529 529
 
530
-	$categories = get_terms( 'give_forms_tag', $args );
530
+	$categories = get_terms('give_forms_tag', $args);
531 531
 
532
-	foreach ( $categories as $category ) {
532
+	foreach ($categories as $category) {
533 533
 		$results[] = array(
534 534
 			'id'   => $category->term_id,
535 535
 			'name' => $category->name,
@@ -545,12 +545,12 @@  discard block
 block discarded – undo
545 545
 	 *
546 546
 	 * @return array $results Contain the tags id and name
547 547
 	 */
548
-	$results = (array) apply_filters( 'give_forms_tags_dropdown_responce', $results );
548
+	$results = (array) apply_filters('give_forms_tags_dropdown_responce', $results);
549 549
 
550
-	wp_send_json( $results );
550
+	wp_send_json($results);
551 551
 }
552 552
 
553
-add_action( 'wp_ajax_give_tags_search', 'give_ajax_tags_search' );
553
+add_action('wp_ajax_give_tags_search', 'give_ajax_tags_search');
554 554
 
555 555
 /**
556 556
  * Check for Price Variations (Multi-level donation forms)
@@ -561,32 +561,32 @@  discard block
 block discarded – undo
561 561
  */
562 562
 function give_check_for_form_price_variations() {
563 563
 
564
-	if ( ! current_user_can( 'edit_give_forms', get_current_user_id() ) ) {
565
-		die( '-1' );
564
+	if ( ! current_user_can('edit_give_forms', get_current_user_id())) {
565
+		die('-1');
566 566
 	}
567 567
 
568
-	$form_id = intval( $_POST['form_id'] );
569
-	$form    = get_post( $form_id );
568
+	$form_id = intval($_POST['form_id']);
569
+	$form    = get_post($form_id);
570 570
 
571
-	if ( 'give_forms' !== $form->post_type ) {
572
-		die( '-2' );
571
+	if ('give_forms' !== $form->post_type) {
572
+		die('-2');
573 573
 	}
574 574
 
575
-	if ( give_has_variable_prices( $form_id ) ) {
576
-		$variable_prices = give_get_variable_prices( $form_id );
575
+	if (give_has_variable_prices($form_id)) {
576
+		$variable_prices = give_get_variable_prices($form_id);
577 577
 
578
-		if ( $variable_prices ) {
578
+		if ($variable_prices) {
579 579
 			$ajax_response = '<select class="give_price_options_select give-select give-select" name="give_price_option">';
580 580
 
581
-			if ( isset( $_POST['all_prices'] ) ) {
582
-				$ajax_response .= '<option value="all">' . esc_html__( 'All Levels', 'give' ) . '</option>';
581
+			if (isset($_POST['all_prices'])) {
582
+				$ajax_response .= '<option value="all">'.esc_html__('All Levels', 'give').'</option>';
583 583
 			}
584 584
 
585
-			foreach ( $variable_prices as $key => $price ) {
585
+			foreach ($variable_prices as $key => $price) {
586 586
 
587
-				$level_text = ! empty( $price['_give_text'] ) ? esc_html( $price['_give_text'] ) : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) );
587
+				$level_text = ! empty($price['_give_text']) ? esc_html($price['_give_text']) : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false)));
588 588
 
589
-				$ajax_response .= '<option value="' . esc_attr( $price['_give_id']['level_id'] ) . '">' . $level_text . '</option>';
589
+				$ajax_response .= '<option value="'.esc_attr($price['_give_id']['level_id']).'">'.$level_text.'</option>';
590 590
 			}
591 591
 			$ajax_response .= '</select>';
592 592
 			echo $ajax_response;
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 	give_die();
597 597
 }
598 598
 
599
-add_action( 'wp_ajax_give_check_for_form_price_variations', 'give_check_for_form_price_variations' );
599
+add_action('wp_ajax_give_check_for_form_price_variations', 'give_check_for_form_price_variations');
600 600
 
601 601
 
602 602
 /**
@@ -607,28 +607,28 @@  discard block
 block discarded – undo
607 607
  * @return void
608 608
  */
609 609
 function give_check_for_form_price_variations_html() {
610
-	if ( ! current_user_can( 'edit_give_payments', get_current_user_id() ) ) {
610
+	if ( ! current_user_can('edit_give_payments', get_current_user_id())) {
611 611
 		wp_die();
612 612
 	}
613 613
 
614
-	$form_id    = ! empty( $_POST['form_id'] ) ? intval( $_POST['form_id'] ) : false;
615
-	$payment_id = ! empty( $_POST['payment_id'] ) ? intval( $_POST['payment_id'] ) : false;
616
-	if ( empty( $form_id ) || empty( $payment_id ) ) {
614
+	$form_id    = ! empty($_POST['form_id']) ? intval($_POST['form_id']) : false;
615
+	$payment_id = ! empty($_POST['payment_id']) ? intval($_POST['payment_id']) : false;
616
+	if (empty($form_id) || empty($payment_id)) {
617 617
 		wp_die();
618 618
 	}
619 619
 
620
-	$form = get_post( $form_id );
621
-	if ( ! empty( $form->post_type ) && 'give_forms' !== $form->post_type ) {
620
+	$form = get_post($form_id);
621
+	if ( ! empty($form->post_type) && 'give_forms' !== $form->post_type) {
622 622
 		wp_die();
623 623
 	}
624 624
 
625
-	if ( ! give_has_variable_prices( $form_id ) || ! $form_id ) {
626
-		esc_html_e( 'n/a', 'give' );
625
+	if ( ! give_has_variable_prices($form_id) || ! $form_id) {
626
+		esc_html_e('n/a', 'give');
627 627
 	} else {
628 628
 		$prices_atts = array();
629
-		if ( $variable_prices = give_get_variable_prices( $form_id ) ) {
630
-			foreach ( $variable_prices as $variable_price ) {
631
-				$prices_atts[ $variable_price['_give_id']['level_id'] ] = give_format_amount( $variable_price['_give_amount'], array( 'sanitize' => false ) );
629
+		if ($variable_prices = give_get_variable_prices($form_id)) {
630
+			foreach ($variable_prices as $variable_price) {
631
+				$prices_atts[$variable_price['_give_id']['level_id']] = give_format_amount($variable_price['_give_amount'], array('sanitize' => false));
632 632
 			}
633 633
 		}
634 634
 
@@ -639,12 +639,12 @@  discard block
 block discarded – undo
639 639
 			'chosen'           => true,
640 640
 			'show_option_all'  => '',
641 641
 			'show_option_none' => '',
642
-			'select_atts'      => 'data-prices=' . esc_attr( json_encode( $prices_atts ) ),
642
+			'select_atts'      => 'data-prices='.esc_attr(json_encode($prices_atts)),
643 643
 		);
644 644
 
645
-		if ( $payment_id ) {
645
+		if ($payment_id) {
646 646
 			// Payment object.
647
-			$payment = new Give_Payment( $payment_id );
647
+			$payment = new Give_Payment($payment_id);
648 648
 
649 649
 			// Payment meta.
650 650
 			$payment_meta                               = $payment->get_meta();
@@ -652,13 +652,13 @@  discard block
 block discarded – undo
652 652
 		}
653 653
 
654 654
 		// Render variable prices select tag html.
655
-		give_get_form_variable_price_dropdown( $variable_price_dropdown_option, true );
655
+		give_get_form_variable_price_dropdown($variable_price_dropdown_option, true);
656 656
 	}
657 657
 
658 658
 	give_die();
659 659
 }
660 660
 
661
-add_action( 'wp_ajax_give_check_for_form_price_variations_html', 'give_check_for_form_price_variations_html' );
661
+add_action('wp_ajax_give_check_for_form_price_variations_html', 'give_check_for_form_price_variations_html');
662 662
 
663 663
 /**
664 664
  * Send Confirmation Email For Complete Donation History Access.
@@ -670,30 +670,30 @@  discard block
 block discarded – undo
670 670
 function give_confirm_email_for_donation_access() {
671 671
 
672 672
 	// Verify Security using Nonce.
673
-	if ( ! check_ajax_referer( 'give_ajax_nonce', 'nonce' ) ) {
673
+	if ( ! check_ajax_referer('give_ajax_nonce', 'nonce')) {
674 674
 		return false;
675 675
 	}
676 676
 
677 677
 	// Bail Out, if email is empty.
678
-	if ( empty( $_POST['email'] ) ) {
678
+	if (empty($_POST['email'])) {
679 679
 		return false;
680 680
 	}
681 681
 
682
-	$donor = Give()->donors->get_donor_by( 'email', give_clean( $_POST['email'] ) );
683
-	if ( Give()->email_access->can_send_email( $donor->id ) ) {
682
+	$donor = Give()->donors->get_donor_by('email', give_clean($_POST['email']));
683
+	if (Give()->email_access->can_send_email($donor->id)) {
684 684
 		$return     = array();
685
-		$email_sent = Give()->email_access->send_email( $donor->id, $donor->email );
685
+		$email_sent = Give()->email_access->send_email($donor->id, $donor->email);
686 686
 
687
-		if ( ! $email_sent ) {
687
+		if ( ! $email_sent) {
688 688
 			$return['status']  = 'error';
689 689
 			$return['message'] = Give()->notices->print_frontend_notice(
690
-				__( 'Unable to send email. Please try again.', 'give' ),
690
+				__('Unable to send email. Please try again.', 'give'),
691 691
 				false,
692 692
 				'error'
693 693
 			);
694 694
 		}
695 695
 
696
-		$return['status']  = 'success';
696
+		$return['status'] = 'success';
697 697
 
698 698
 		/**
699 699
 		 * Filter to modify access mail send notice
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 		 *
705 705
 		 * @return  string $message Send notice message for email access.
706 706
 		 */
707
-		$message = (string) apply_filters( 'give_email_access_mail_send_notice', __( 'Please check your email and click on the link to access your complete donation history.', 'give' ) );
707
+		$message = (string) apply_filters('give_email_access_mail_send_notice', __('Please check your email and click on the link to access your complete donation history.', 'give'));
708 708
 
709 709
 		$return['message'] = Give()->notices->print_frontend_notice(
710 710
 			$message,
@@ -730,8 +730,8 @@  discard block
 block discarded – undo
730 730
 		$message = (string) apply_filters(
731 731
 			'give_email_access_requests_exceed_notice',
732 732
 			sprintf(
733
-				__( 'Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give' ),
734
-				sprintf( _n( '%s minute', '%s minutes', $value, 'give' ), $value )
733
+				__('Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give'),
734
+				sprintf(_n('%s minute', '%s minutes', $value, 'give'), $value)
735 735
 			),
736 736
 			$value
737 737
 		);
@@ -743,8 +743,8 @@  discard block
 block discarded – undo
743 743
 		);
744 744
 	}
745 745
 
746
-	echo json_encode( $return );
746
+	echo json_encode($return);
747 747
 	give_die();
748 748
 }
749 749
 
750
-add_action( 'wp_ajax_nopriv_give_confirm_email_for_donations_access', 'give_confirm_email_for_donation_access' );
751 750
\ No newline at end of file
751
+add_action('wp_ajax_nopriv_give_confirm_email_for_donations_access', 'give_confirm_email_for_donation_access');
752 752
\ No newline at end of file
Please login to merge, or discard this patch.