title: Woocommerce overwriting Shipping City Select Field
body: <p>We are attempting to modify the default Woocommerce Checkout Shipping City Field using the documented methods on <a href="https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/" rel="nofollow noreferrer">docs.woothemes</a> but have run into an issue.</p>
  <p>We have replaced the <code>shipping_city</code> text field with a <code>select</code> dropdown menu.</p>
  <p>On page load the <code>select</code> dropdown menu is replaced with the default text field and if available is autofilled with the users previous delivery destination.</p>
  <p>However, if the page is reloaded/refreshed the text field is then replaced with the new and much desired <code>select</code> dropdown menu.</p>
  <p>We have filtered the field using several WordPress <code>add_filter</code> functions and changed <code>priority</code> both up and down (-999 to 999).</p>
  <p>We have run the <code>filter</code> both inside and outside of our Shipping Method <code>Class</code></p>
  <p>We have even disabled the browser auto form complete because we… well ran out of other ideas…</p>
  <p>When the <code>select</code> field is working… it works well. The Shipping costs get updated, data gets returned, stored and emailed.</p>
  <p>The <code>filters</code> used are:</p>
  <p><code>add_filter( 'woocommerce_checkout_fields', array( $this, 'fn_name' ) );</code></p>
  <p><code>add_filter( 'woocommerce_default_address_fields', array( $this, 'fn_name' ) );</code></p>
  <p>and the <code>$field</code> array looks like:</p>
  <pre><code>$fields[ 'shipping' ][ 'shipping_city' ] = array(
                      'label' =&gt; __( 'Suburb/City', 'woocommerce' ),
                      'required' =&gt; FALSE,
                      'clear' =&gt; TRUE,
                      'type' =&gt; 'select',
                      'options' =&gt; $options_array,
                      'class' =&gt; array( 'update_totals_on_change' )
                  );
  
                  return $fields;
  </code></pre>
  <p>Oddly, when we ran two filters on the same field; the label of the sendond was overwritten by the first… go figure… Gee I wish I knew Ajax… i think its Ajax but then if I knew AJAX I'd know if it was Ajax…</p>
  <p>WordPress Version 4.5.2 &amp;&amp; WooCommerce Version 2.5.5</p>
  <p><em><strong>Addendum regarding final accepted solution:</strong></em></p>
  <p>The code suggested and supplied by @LoicTheAztec worked very well and has been included in our implementation.</p>
  <p>However, the issue was caused by our original inclusion of the $field filter inside of our Shipping Method Class which is hooked into the shipping_class_init</p>
  <p>To correct the issue we have moved the new woocommerce_form_field_args filter into a seperate file and retrieved our options array after the new Shipping Method Class has worked its magic.</p>