How to reorder the woocommerce checkout form fields?

In wordpress while using woocommerce to develope ecommerce website if we want to customize the checkout form by moving some fields from its default position. How to reorder the woocommerce checout fields?

Woocommerce is one of very popular plugin to create ecommerce plate form in wordpress. Developing a website in woocommece requires less time, effort and cost until any customization is made. We can get a plenty of built in themes with attractive designs and features.

But sometime we don't go with readymade themes instead we ask designer to create design and get the web pages ready in bootstrap. To integrate the design in woocommerce specially checkout form requires programming knowledge of woocomerce. So, to reorder the checkout form fields we can use below hook and get it done as per our requirement easily. Write the below code in functions.php of wordpress or create a custom plugin for the same:

add_filter("woocommerce_checkout_fields", "custom_form_fields");

function custom_form_fields($fields) {

    $field_order = array(

    foreach($field_order as $field)
        $ordered_fields[$field] = $fields["billing"][$field];

    $fields["billing"] = $ordered_fields;
    return $fields;