Address fields are controlled by the WC_Countries
class and can be filtered via:
$address_fields = apply_filters( 'woocommerce_' . $type . 'fields', $address_fields, $country );
where there are 2 $types: billing and shipping. Once you’ve found that it is just PHP array manipulation:
function reorder_shipping_fields( $address_fields ){
if ( isset( $address_fields['shipping_company'] ) ){
$shipping_company = $address_fields['shipping_company'];
unset( $address_fields['shipping_company'] );
$address_fields['shipping_company'] = $shipping_company;
}
return $address_fields;
}
add_filter( 'woocommerce_shipping_fields', 'reorder_shipping_fields' );