Completed
Pull Request — master (#2509)
by
unknown
41s
created
square/controllers/FrmSquareLiteAppController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 		$address_setting    = $action->post_content['billing_address'];
124 124
 
125 125
 		$entry      = self::generate_false_entry();
126
-		$first_name = $first_name_setting && isset( $entry->metas[ $first_name_setting ] ) ? $entry->metas[ $first_name_setting ] : '';
127
-		$last_name  = $last_name_setting && isset( $entry->metas[ $last_name_setting ] ) ? $entry->metas[ $last_name_setting ] : '';
128
-		$address    = $address_setting && isset( $entry->metas[ $address_setting ] ) ? $entry->metas[ $address_setting ] : '';
126
+		$first_name = $first_name_setting && isset( $entry->metas[$first_name_setting] ) ? $entry->metas[$first_name_setting] : '';
127
+		$last_name  = $last_name_setting && isset( $entry->metas[$last_name_setting] ) ? $entry->metas[$last_name_setting] : '';
128
+		$address    = $address_setting && isset( $entry->metas[$address_setting] ) ? $entry->metas[$address_setting] : '';
129 129
 
130 130
 		if ( is_array( $first_name ) && isset( $first_name['first'] ) ) {
131 131
 			$first_name = $first_name['first'];
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		);
142 142
 
143 143
 		if ( $email_setting ) {
144
-			$shortcode_atts   = array(
144
+			$shortcode_atts = array(
145 145
 				'entry' => $entry,
146 146
 				'form'  => $action->menu_order,
147 147
 				'value' => $email_setting,
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 				if ( is_array( $v ) ) {
182 182
 					foreach ( $v as $f => $value ) {
183 183
 						FrmAppHelper::sanitize_value( 'wp_kses_post', $value );
184
-						$entry->metas[ absint( $f ) ] = $value;
184
+						$entry->metas[absint( $f )] = $value;
185 185
 					}
186 186
 				}
187 187
 			} else {
Please login to merge, or discard this patch.
square/controllers/FrmSquareLiteActionsController.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,8 @@  discard block
 block discarded – undo
139 139
 	 * @return string|true string on error, true on success.
140 140
 	 */
141 141
 	private static function trigger_one_time_payment( $atts ) {
142
-		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
142
+		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) {
143
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
143 144
 			return __( 'Please enter a valid credit card', 'formidable' );
144 145
 		}
145 146
 
@@ -199,7 +200,8 @@  discard block
 block discarded – undo
199 200
 	 * @return bool|string True on success, error message on failure
200 201
 	 */
201 202
 	private static function trigger_recurring_payment( $atts ) {
202
-		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
203
+		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) {
204
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
203 205
 			return __( 'Please enter a valid credit card', 'formidable' );
204 206
 		}
205 207
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$gateway   = $payment_action->post_content['gateway'];
77 77
 			$is_square = $gateway === 'square' || ( is_array( $gateway ) && in_array( 'square', $gateway, true ) );
78 78
 			if ( ! $is_square || empty( $payment_action->post_content['amount'] ) ) {
79
-				unset( $payment_actions[ $k ] );
79
+				unset( $payment_actions[$k] );
80 80
 			}
81 81
 		}
82 82
 		return $payment_actions;
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			'run_triggers' => false,
98 98
 			'show_errors'  => true,
99 99
 		);
100
-		$atts     = compact( 'action', 'entry', 'form' );
100
+		$atts = compact( 'action', 'entry', 'form' );
101 101
 
102 102
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
103 103
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 				'value' => $atts['action']->post_content['description'],
151 151
 			)
152 152
 		);
153
-		$result             = FrmSquareLiteConnectHelper::create_payment( $atts['amount'], $currency, $square_token, $verification_token, $description );
153
+		$result = FrmSquareLiteConnectHelper::create_payment( $atts['amount'], $currency, $square_token, $verification_token, $description );
154 154
 
155 155
 		if ( false === $result ) {
156 156
 			return FrmSquareLiteConnectHelper::get_latest_error_from_square_api();
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 			false
456 456
 		);
457 457
 
458
-		$square_vars     = array(
458
+		$square_vars = array(
459 459
 			'formId'     => $form_id,
460 460
 			'nonce'      => wp_create_nonce( 'frm_square_ajax' ),
461 461
 			'ajax'       => esc_url_raw( FrmAppHelper::get_ajax_url() ),
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 		$disallowed = array( ';', ':', '!important' );
573 573
 		foreach ( $settings as $k => $s ) {
574 574
 			if ( is_string( $s ) ) {
575
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
575
+				$settings[$k] = str_replace( $disallowed, '', $s );
576 576
 			}
577 577
 		}
578 578
 
@@ -598,11 +598,11 @@  discard block
 block discarded – undo
598 598
 
599 599
 		$field_id = isset( $field->temp_id ) ? $field->temp_id : $field->id;
600 600
 
601
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
602
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
601
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
602
+			unset( $errors['field' . $field_id . '-cc'] );
603 603
 		}
604
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
605
-			unset( $errors[ 'field' . $field_id ] );
604
+		if ( isset( $errors['field' . $field_id] ) ) {
605
+			unset( $errors['field' . $field_id] );
606 606
 		}
607 607
 
608 608
 		return $errors;
Please login to merge, or discard this patch.
stripe/controllers/FrmTransLiteActionsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -472,8 +472,8 @@  discard block
 block discarded – undo
472 472
 			return $values;
473 473
 		}
474 474
 
475
-		if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[ $field->id ] ) ) {
476
-			$values['value'] = $previous_entry->metas[ $field->id ];
475
+		if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[$field->id] ) ) {
476
+			$values['value'] = $previous_entry->metas[$field->id];
477 477
 		}
478 478
 
479 479
 		$frm_vars['trans_filled'] = true;
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 			 * @param Closure    $destroy_callback
509 509
 			 * @return void
510 510
 			 */
511
-			function () use ( $entry_id, &$destroy_callback ) {
511
+			function() use ( $entry_id, &$destroy_callback ) {
512 512
 				FrmEntry::destroy( $entry_id );
513 513
 				// Only call this once.
514 514
 				remove_action( 'frm_entry_form', $destroy_callback );
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 	 * @return array
529 529
 	 */
530 530
 	public static function before_save_settings( $settings, $action ) {
531
-		$settings['gateway']  = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
531
+		$settings['gateway'] = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
532 532
 
533 533
 		if ( in_array( 'square', $settings['gateway'] ) ) {
534 534
 			$currency = FrmSquareLiteConnectHelper::get_merchant_currency();
Please login to merge, or discard this patch.
classes/controllers/FrmSettingsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 				$section['function'] = $original;
174 174
 			}
175 175
 
176
-			$sections[ $key ] = $section;
176
+			$sections[$key] = $section;
177 177
 		}//end foreach
178 178
 
179 179
 		return $sections;
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
 
194 194
 		foreach ( $sections as $key => $section ) {
195 195
 			if ( in_array( $key, $payment_section_keys, true ) ) {
196
-				self::$removed_payments_sections[ $key ] = $section;
197
-				unset( $sections[ $key ] );
196
+				self::$removed_payments_sections[$key] = $section;
197
+				unset( $sections[$key] );
198 198
 			}
199 199
 		}
200 200
 
@@ -226,11 +226,11 @@  discard block
 block discarded – undo
226 226
 
227 227
 		$section  = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' );
228 228
 		$sections = self::get_settings_tabs();
229
-		if ( ! isset( $sections[ $section ] ) ) {
229
+		if ( ! isset( $sections[$section] ) ) {
230 230
 			wp_die();
231 231
 		}
232 232
 
233
-		$section = $sections[ $section ];
233
+		$section = $sections[$section];
234 234
 
235 235
 		if ( isset( $section['class'] ) ) {
236 236
 			call_user_func( array( $section['class'], $section['function'] ) );
Please login to merge, or discard this patch.
classes/controllers/FrmFieldsController.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 		$_GET['page'] = 'formidable';
27 27
 
28
-		$values     = array(
28
+		$values = array(
29 29
 			'id'         => FrmAppHelper::get_post_param( 'form_id', '', 'absint' ),
30 30
 			'doing_ajax' => true,
31 31
 		);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 			ob_start();
50 50
 			self::load_single_field( $field, $values );
51
-			$field_html[ absint( $field->id ) ] = ob_get_contents();
51
+			$field_html[absint( $field->id )] = ob_get_contents();
52 52
 			ob_end_clean();
53 53
 		}
54 54
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 			foreach ( $opts as $opt_key => $opt ) {
264 264
 				if ( strpos( $opt, '|' ) !== false ) {
265 265
 					$vals             = explode( '|', $opt );
266
-					$opts[ $opt_key ] = array(
266
+					$opts[$opt_key] = array(
267 267
 						'label' => trim( $vals[0] ),
268 268
 						'value' => trim( $vals[1] ),
269 269
 					);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 			$other_array = array();
279 279
 			foreach ( $field['options'] as $opt_key => $opt ) {
280 280
 				if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) {
281
-					$other_array[ $opt_key ] = $opt;
281
+					$other_array[$opt_key] = $opt;
282 282
 				}
283 283
 				unset( $opt_key, $opt );
284 284
 			}
@@ -321,18 +321,18 @@  discard block
 block discarded – undo
321 321
 		$frm_settings         = FrmAppHelper::get_settings();
322 322
 		$field_types          = FrmFieldTypeOptionData::get_field_types( $field['type'] );
323 323
 
324
-		if ( ! isset( $all_field_types[ $field['type'] ] ) ) {
324
+		if ( ! isset( $all_field_types[$field['type']] ) ) {
325 325
 			// Add fallback for an add-on field type that has been deactivated.
326
-			$all_field_types[ $field['type'] ] = array(
326
+			$all_field_types[$field['type']] = array(
327 327
 				'name' => ucfirst( $field['type'] ),
328 328
 				'icon' => 'frm_icon_font frm_pencil_icon',
329 329
 			);
330
-		} elseif ( ! is_array( $all_field_types[ $field['type'] ] ) ) {
330
+		} elseif ( ! is_array( $all_field_types[$field['type']] ) ) {
331 331
 			// Fallback for fields added in a more basic way.
332
-			FrmFormsHelper::prepare_field_type( $all_field_types[ $field['type'] ] );
332
+			FrmFormsHelper::prepare_field_type( $all_field_types[$field['type']] );
333 333
 		}
334 334
 
335
-		$type_name = $all_field_types[ $field['type'] ]['name'];
335
+		$type_name = $all_field_types[$field['type']]['name'];
336 336
 		if ( $field['type'] === 'divider' && FrmField::is_option_true( $field, 'repeat' ) ) {
337 337
 			$type_name = $all_field_types['divider|repeat']['name'];
338 338
 		}
@@ -409,14 +409,14 @@  discard block
 block discarded – undo
409 409
 
410 410
 		if ( FrmAppHelper::pro_is_connected() ) {
411 411
 			foreach ( $settings as $type ) {
412
-				if ( ! empty( $field[ $type ] ) ) {
412
+				if ( ! empty( $field[$type] ) ) {
413 413
 					$active = $type;
414 414
 				}
415 415
 			}
416 416
 		}
417 417
 
418
-		$types[ $active ]['class']  .= ' current';
419
-		$types[ $active ]['current'] = true;
418
+		$types[$active]['class']  .= ' current';
419
+		$types[$active]['current'] = true;
420 420
 
421 421
 		return $types;
422 422
 	}
@@ -434,8 +434,8 @@  discard block
 block discarded – undo
434 434
 			'website' => 'url',
435 435
 			'image'   => 'url',
436 436
 		);
437
-		if ( isset( $type_switch[ $type ] ) ) {
438
-			$type = $type_switch[ $type ];
437
+		if ( isset( $type_switch[$type] ) ) {
438
+			$type = $type_switch[$type];
439 439
 		}
440 440
 
441 441
 		$pro_fields = FrmField::pro_field_selection();
@@ -590,11 +590,11 @@  discard block
 block discarded – undo
590 590
 		// include "col" for valid html
591 591
 		$unit = trim( preg_replace( '/[0-9]+/', '', $field['size'] ) );
592 592
 
593
-		if ( ! isset( $calc[ $unit ] ) ) {
593
+		if ( ! isset( $calc[$unit] ) ) {
594 594
 			return;
595 595
 		}
596 596
 
597
-		$size = (float) str_replace( $unit, '', $field['size'] ) / $calc[ $unit ];
597
+		$size = (float) str_replace( $unit, '', $field['size'] ) / $calc[$unit];
598 598
 
599 599
 		$add_html['cols'] = 'cols="' . absint( $size ) . '"';
600 600
 	}
@@ -827,11 +827,11 @@  discard block
 block discarded – undo
827 827
 	private static function get_form_for_js_validation( $field ) {
828 828
 		global $frm_vars;
829 829
 		if ( ! empty( $frm_vars['js_validate_forms'] ) ) {
830
-			if ( isset( $frm_vars['js_validate_forms'][ $field['form_id'] ] ) ) {
831
-				return $frm_vars['js_validate_forms'][ $field['form_id'] ];
830
+			if ( isset( $frm_vars['js_validate_forms'][$field['form_id']] ) ) {
831
+				return $frm_vars['js_validate_forms'][$field['form_id']];
832 832
 			}
833
-			if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][ $field['parent_form_id'] ] ) ) {
834
-				return $frm_vars['js_validate_forms'][ $field['parent_form_id'] ];
833
+			if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][$field['parent_form_id']] ) ) {
834
+				return $frm_vars['js_validate_forms'][$field['parent_form_id']];
835 835
 			}
836 836
 		}
837 837
 		return false;
@@ -918,13 +918,13 @@  discard block
 block discarded – undo
918 918
 		foreach ( $field['shortcodes'] as $k => $v ) {
919 919
 			if ( isset( $field['subfield_name'] ) && 0 === strpos( $k, 'aria-invalid' ) ) {
920 920
 				$subfield_name = $field['subfield_name'];
921
-				if ( ! isset( $field['shortcodes'][ 'aria-invalid-' . $subfield_name ] ) ) {
921
+				if ( ! isset( $field['shortcodes']['aria-invalid-' . $subfield_name] ) ) {
922 922
 					continue;
923 923
 				}
924 924
 				// Change the key to the correct aria-invalid value so that $add_html is set correctly for the current subfield of a combo field.
925 925
 				$k = 'aria-invalid';
926
-				$v = $field['shortcodes'][ 'aria-invalid-' . $subfield_name ];
927
-				unset( $field['shortcodes'][ 'aria-invalid-' . $subfield_name ] );
926
+				$v = $field['shortcodes']['aria-invalid-' . $subfield_name];
927
+				unset( $field['shortcodes']['aria-invalid-' . $subfield_name] );
928 928
 			}
929 929
 			if ( 'opt' === $k || ! self::should_allow_input_attribute( $k ) ) {
930 930
 				continue;
@@ -932,10 +932,10 @@  discard block
 block discarded – undo
932 932
 
933 933
 			if ( is_numeric( $k ) && strpos( $v, '=' ) ) {
934 934
 				$add_html[] = $v;
935
-			} elseif ( ! empty( $k ) && isset( $add_html[ $k ] ) ) {
936
-				$add_html[ $k ] = str_replace( $k . '="', $k . '="' . $v, $add_html[ $k ] );
935
+			} elseif ( ! empty( $k ) && isset( $add_html[$k] ) ) {
936
+				$add_html[$k] = str_replace( $k . '="', $k . '="' . $v, $add_html[$k] );
937 937
 			} else {
938
-				$add_html[ $k ] = $k . '="' . esc_attr( $v ) . '"';
938
+				$add_html[$k] = $k . '="' . esc_attr( $v ) . '"';
939 939
 			}
940 940
 
941 941
 			unset( $k, $v );
Please login to merge, or discard this patch.
classes/views/frm-settings/payments.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@
 block discarded – undo
31 31
 	if ( $is_active ) {
32 32
 		$input_params['checked'] = 'checked';
33 33
 	}
34
-	$other_section_selectors      = array_map(
35
-		function ( $section ) {
34
+	$other_section_selectors = array_map(
35
+		function( $section ) {
36 36
 			return "#frm_{$section}_settings_section";
37 37
 		},
38 38
 		array_diff( array_keys( $payment_sections ), array( $key ) )
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/html-content.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 		<?php esc_html_e( 'Content', 'formidable' ); ?>
9 9
 	</label>
10 10
 	<?php
11
-	$e_args  = array(
11
+	$e_args = array(
12 12
 		'textarea_name' => 'field_options[description_' . absint( $field['id'] ) . ']',
13 13
 		'textarea_rows' => 7,
14 14
 	);
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/settings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 						if ( FrmAppHelper::pro_is_connected() && ! is_callable( array( 'FrmProHtmlHelper', 'echo_radio_group' ) ) ) {
190 190
 							switch ( $type ) {
191 191
 								case 'calc':
192
-									$default_value_type['data']  = array(
192
+									$default_value_type['data'] = array(
193 193
 										'show'    => '#calc-for-{id}',
194 194
 										'disable' => '#default-value-for-{id}',
195 195
 									);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 						);
217 217
 
218 218
 						foreach ( $default_value_type['data'] as $data_key => $data_value ) {
219
-							$toggle_args['input_html'][ 'data-' . $data_key ] = $data_value . ( substr( $data_value, -1 ) === '-' ? $field['id'] : '' );
219
+							$toggle_args['input_html']['data-' . $data_key] = $data_value . ( substr( $data_value, -1 ) === '-' ? $field['id'] : '' );
220 220
 						}
221 221
 
222 222
 						?>
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteActionsController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			$gateway   = $payment_action->post_content['gateway'];
73 73
 			$is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) );
74 74
 			if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) {
75
-				unset( $payment_actions[ $k ] );
75
+				unset( $payment_actions[$k] );
76 76
 			}
77 77
 		}
78 78
 		return $payment_actions;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			'run_triggers' => false,
110 110
 			'show_errors'  => true,
111 111
 		);
112
-		$atts     = compact( 'action', 'entry', 'form' );
112
+		$atts = compact( 'action', 'entry', 'form' );
113 113
 
114 114
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
115 115
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
 		// Gateway is a radio button but it should always be an array in the database for
298 298
 		// compatibility with the payments submodule where it is a checkbox.
299
-		$settings['gateway']  = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
299
+		$settings['gateway'] = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
300 300
 
301 301
 		$is_stripe = in_array( 'stripe', $settings['gateway'], true );
302 302
 		if ( ! $is_stripe ) {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 		$disallowed = array( ';', ':', '!important' );
488 488
 		foreach ( $settings as $k => $s ) {
489 489
 			if ( is_string( $s ) ) {
490
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
490
+				$settings[$k] = str_replace( $disallowed, '', $s );
491 491
 			}
492 492
 		}
493 493
 
@@ -611,18 +611,18 @@  discard block
 block discarded – undo
611 611
 	 * @return array
612 612
 	 */
613 613
 	public static function remove_cc_validation( $errors, $field, $values ) {
614
-		$has_processed = isset( $_POST[ 'frmintent' . $field->form_id ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
614
+		$has_processed = isset( $_POST['frmintent' . $field->form_id] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
615 615
 		if ( ! $has_processed ) {
616 616
 			return $errors;
617 617
 		}
618 618
 
619 619
 		$field_id = $field->temp_id ?? $field->id;
620 620
 
621
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
622
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
621
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
622
+			unset( $errors['field' . $field_id . '-cc'] );
623 623
 		}
624
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
625
-			unset( $errors[ 'field' . $field_id ] );
624
+		if ( isset( $errors['field' . $field_id] ) ) {
625
+			unset( $errors['field' . $field_id] );
626 626
 		}
627 627
 
628 628
 		return $errors;
Please login to merge, or discard this patch.