I'm creating a madlib style checkout form using WooTheme's Customizing checkout fields using actions and filters.
Billing fields in the checkout template form-billing.php
are displayed with this call:
<?php foreach ($checkout->checkout_fields['billing'] as $key => $field) : ?>
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
<?php endforeach; ?>
How can change the order the fields appear?
The current (default) field order is:
first name
last name
company (hidden for me)
town/city
zipcode
country
state
email
phone
Default order:
I want the fields to be in a more natural order for Americans (where I live), so:
first name
last name
company (hidden for me)
town/city
state
zipcode
country
email
phone
How can I best do this?