get_checkout_fields( 'shipping' ) ); $fields_layout = array( array( 'shipping_first_name', 'shipping_last_name', ), array( 'shipping_company', ), array( 'shipping_country', ), array( 'shipping_state' ), array( 'shipping_city', 'shipping_postcode', ), array( 'shipping_address_1', ), array( 'shipping_address_2', ), array( 'shipping_phone', 'shipping_email', ), ); $outside_layout_fields = array_diff( array_keys( $shipping_address_fields ), array_reduce( $fields_layout, function( $result, $row ) { return array_merge( $result, $row ); }, array() ) ); $exclude_fields = array(); ?>
cart->needs_shipping_address() ) : ?>

'; foreach ( $row as $field_key ) { if ( ! isset( $shipping_address_fields[ $field_key ] ) ) { continue; } echo '
'; woocommerce_form_field( $field_key, $shipping_address_fields[ $field_key ], $checkout->get_value( $field_key ) ); echo '
'; } echo '
'; } foreach ( $outside_layout_fields as $field_key ) { if ( ! isset( $shipping_address_fields[ $field_key ] ) || in_array( $field_key, $exclude_fields, true ) ) { continue; } echo '
'; woocommerce_form_field( $field_key, $shipping_address_fields[ $field_key ], $checkout->get_value( $field_key ) ); echo '
'; } ?>
cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?>

get_checkout_fields( 'order' ) as $key => $field ) : ?>
get_value( $key ) ); ?>