Move variable declaration outside foreach loop
This commit is contained in:
parent
79db2d95a0
commit
f20e8ab567
|
@ -679,14 +679,14 @@ class WC_Checkout {
|
||||||
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
||||||
|
|
||||||
$skipped = array();
|
$skipped = array();
|
||||||
|
$form_was_shown = isset( $_POST['woocommerce-process-checkout-nonce'] );
|
||||||
|
|
||||||
foreach ( $this->get_checkout_fields() as $fieldset_key => $fieldset ) {
|
foreach ( $this->get_checkout_fields() as $fieldset_key => $fieldset ) {
|
||||||
if ( $this->maybe_skip_fieldset( $fieldset_key, $data ) ) {
|
if ( $this->maybe_skip_fieldset( $fieldset_key, $data ) ) {
|
||||||
$skipped[] = $fieldset_key;
|
$skipped[] = $fieldset_key;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$form_was_shown = isset( $_REQUEST['woocommerce-process-checkout-nonce'] );
|
|
||||||
|
|
||||||
foreach ( $fieldset as $key => $field ) {
|
foreach ( $fieldset as $key => $field ) {
|
||||||
$type = sanitize_title( isset( $field['type'] ) ? $field['type'] : 'text' );
|
$type = sanitize_title( isset( $field['type'] ) ? $field['type'] : 'text' );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue