I am trying to change the order of the customer details fields displayed in the Woocommerce mail sent to both customer and admin after purchase (table name: addresses).
I checked the file responsible of outputting the billing & shipping fields which is plugins/woocommerce/templates/email-customer-details.php
but the customer details are outputted only through a foreach loop and the variable $fields
is not even there.
<?php foreach ( $fields as $field ) : ?>
<li><strong><?php echo wp_kses_post( $field['label'] ); ?>:</strong> <span class="text"><?php echo wp_kses_post( $field['value'] ); ?></span></li>
<?php endforeach; ?>
So, where to change the order of the fields? In particular, I'd like to display the state before the zipcode.