Title: Checkout Fields &#8211; Postcode always after state
Last modified: March 15, 2017

---

# Checkout Fields – Postcode always after state

 *  [streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * (@streamworksaudio)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/checkout-fields-postcode-always-after-state/)
 * I am trying to create a filter to change the order of the Billing Fields. I have
   got it mostly working, however, no matter where I place ‘billing_postcode’ the
   field is always next to the state field.
 * Is there any way to decouple the postcode field from the state field?
 * This is what I am using:
 *     ```
       function custom_woocommerce_checkout_fields( $fields ) {
   
       $order = array(
           "billing_state",
           "billing_first_name",
           "billing_last_name",
           "billing_address_1",
           "billing_address_2",
           "billing_postcode",
           "billing_city",
           "billing_country",
   
       );
   
       foreach ($order as $field) {
           $ordered_fields[$field] = $fields["billing"][$field];
       }
   
       $fields["billing"] = $ordered_fields;
       return $fields;
       } add_filter( 'woocommerce_checkout_fields' , 'custom_woocommerce_checkout_fields' );
       ```
   

Viewing 1 replies (of 1 total)

 *  [Maciej Swoboda](https://wordpress.org/support/users/swoboda/)
 * (@swoboda)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/checkout-fields-postcode-always-after-state/#post-8989892)
 * Hi [@streamworksaudio](https://wordpress.org/support/users/streamworksaudio/),
 * Did you try to use a plugin for that? You can check our free plugin for customizing
   checkout fields, changing order included: [https://wordpress.org/plugins/flexible-checkout-fields/](https://wordpress.org/plugins/flexible-checkout-fields/)

Viewing 1 replies (of 1 total)

The topic ‘Checkout Fields – Postcode always after state’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Maciej Swoboda](https://wordpress.org/support/users/swoboda/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/checkout-fields-postcode-always-after-state/#post-8989892)
 * Status: not resolved