title: how add input field "address" to shipping calculator?
body: <p>i have problems with the shipping-calculator form.</p>
  <p>I would like to add an address field, and when updating the user's address is changed.</p>
  <p>I currently have this code.</p>
  <pre><code>defined( 'ABSPATH' ) || exit;
  
  do_action( 'woocommerce_before_shipping_calculator' ); ?&gt;
  
  &lt;form class=&quot;woocommerce-shipping-calculator&quot; action=&quot;&lt;?php echo esc_url( wc_get_cart_url() ); ?&gt;&quot; method=&quot;post&quot;&gt;
  
      &lt;?php printf( '&lt;a href=&quot;#&quot; class=&quot;shipping-calculator-button&quot;&gt;%s&lt;/a&gt;', esc_html( ! empty( $button_text ) ? $button_text : __( 'Calculate shipping', 'woocommerce' ) ) ); ?&gt;
  
      &lt;section class=&quot;shipping-calculator-form&quot; style=&quot;display:none;&quot;&gt;
  
          &lt;?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_country', true ) ) : ?&gt;
              &lt;p class=&quot;form-row form-row-wide&quot; id=&quot;calc_shipping_country_field&quot;&gt;
                  &lt;select name=&quot;calc_shipping_country&quot; id=&quot;calc_shipping_country&quot; class=&quot;country_to_state country_select&quot; rel=&quot;calc_shipping_state&quot;&gt;
                      &lt;option value=&quot;&quot;&gt;&lt;?php esc_html_e( 'Select a country / region&amp;hellip;', 'woocommerce' ); ?&gt;&lt;/option&gt;
                      &lt;?php
                      foreach ( WC()-&gt;countries-&gt;get_shipping_countries() as $key =&gt; $value ) {
                          echo '&lt;option value=&quot;' . esc_attr( $key ) . '&quot;' . selected( WC()-&gt;customer-&gt;get_shipping_country(), esc_attr( $key ), false ) . '&gt;' . esc_html( $value ) . '&lt;/option&gt;';
                      }
                      ?&gt;
                  &lt;/select&gt;
              &lt;/p&gt;
          &lt;?php endif; ?&gt;
  
          &lt;?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_state', true ) ) : ?&gt;
              &lt;p class=&quot;form-row form-row-wide&quot; id=&quot;calc_shipping_state_field&quot;&gt;
                  &lt;?php
                  $current_cc = WC()-&gt;customer-&gt;get_shipping_country();
                  $current_r  = WC()-&gt;customer-&gt;get_shipping_state();
                  $states     = WC()-&gt;countries-&gt;get_states( $current_cc );
  
                  if ( is_array( $states ) &amp;&amp; empty( $states ) ) {
                      ?&gt;
                      &lt;input type=&quot;hidden&quot; name=&quot;calc_shipping_state&quot; id=&quot;calc_shipping_state&quot; placeholder=&quot;&lt;?php esc_attr_e( 'State / County', 'woocommerce' ); ?&gt;&quot; /&gt;
                      &lt;?php
                  } elseif ( is_array( $states ) ) {
                      ?&gt;
                      &lt;span&gt;
                          &lt;select name=&quot;calc_shipping_state&quot; class=&quot;state_select&quot; id=&quot;calc_shipping_state&quot; data-placeholder=&quot;&lt;?php esc_attr_e( 'State / County', 'woocommerce' ); ?&gt;&quot;&gt;
                              &lt;option value=&quot;&quot;&gt;&lt;?php esc_html_e( 'Select an option&amp;hellip;', 'woocommerce' ); ?&gt;&lt;/option&gt;
                              &lt;?php
                              foreach ( $states as $ckey =&gt; $cvalue ) {
                                  echo '&lt;option value=&quot;' . esc_attr( $ckey ) . '&quot; ' . selected( $current_r, $ckey, false ) . '&gt;' . esc_html( $cvalue ) . '&lt;/option&gt;';
                              }
                              ?&gt;
                          &lt;/select&gt;
                      &lt;/span&gt;
                      &lt;?php
                  } else {
                      ?&gt;
                      &lt;input type=&quot;text&quot; class=&quot;input-text&quot; value=&quot;&lt;?php echo esc_attr( $current_r ); ?&gt;&quot; placeholder=&quot;&lt;?php esc_attr_e( 'State / County', 'woocommerce' ); ?&gt;&quot; name=&quot;calc_shipping_state&quot; id=&quot;calc_shipping_state&quot; /&gt;
                      &lt;?php
                  }
                  ?&gt;
              &lt;/p&gt;
          &lt;?php endif; ?&gt;
  
          &lt;?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_city', true ) ) : ?&gt;
              &lt;p class=&quot;form-row form-row-wide&quot; id=&quot;calc_shipping_city_field&quot;&gt;
                  &lt;input type=&quot;text&quot; class=&quot;input-text&quot; value=&quot;&lt;?php echo esc_attr( WC()-&gt;customer-&gt;get_shipping_city() ); ?&gt;&quot; placeholder=&quot;&lt;?php esc_attr_e( 'City', 'woocommerce' ); ?&gt;&quot; name=&quot;calc_shipping_city&quot; id=&quot;calc_shipping_city&quot; /&gt;
              &lt;/p&gt;
          &lt;?php endif; ?&gt;
  
          &lt;?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_postcode', true ) ) : ?&gt;
              &lt;p class=&quot;form-row form-row-wide&quot; id=&quot;calc_shipping_postcode_field&quot;&gt;
                  &lt;input type=&quot;text&quot; class=&quot;input-text&quot; value=&quot;&lt;?php echo esc_attr( WC()-&gt;customer-&gt;get_shipping_postcode() ); ?&gt;&quot; placeholder=&quot;&lt;?php esc_attr_e( 'Postcode / ZIP', 'woocommerce' ); ?&gt;&quot; name=&quot;calc_shipping_postcode&quot; id=&quot;calc_shipping_postcode&quot; /&gt;
              &lt;/p&gt;
          &lt;?php endif; ?&gt;
          
          &lt;!-- Start New Field --&gt;
          &lt;p class=&quot;form-row form-row-wide&quot; id=&quot;shipping_address_field&quot;&gt;
              &lt;input type=&quot;text&quot; class=&quot;input-text&quot; value=&quot;&lt;?php echo esc_attr( WC()-&gt;customer-&gt;get_shipping_address() ); ?&gt;&quot; id=&quot;shipping_address_field&quot; name=&quot;shipping_address_field&quot; placeholder=&quot;Ingrese su nueva dirección&quot;&gt;
          &lt;/p&gt;
          &lt;!-- End New Field --&gt;
  
          &lt;p&gt;&lt;button type=&quot;submit&quot; name=&quot;calc_shipping&quot; value=&quot;1&quot; class=&quot;button&quot;&gt;&lt;?php esc_html_e( 'Update', 'woocommerce' ); ?&gt;&lt;/button&gt;&lt;/p&gt;
          &lt;?php wp_nonce_field( 'woocommerce-shipping-calculator', 'woocommerce-shipping-calculator-nonce' ); ?&gt;
      &lt;/section&gt;
  &lt;/form&gt;
  
  &lt;?php do_action( 'woocommerce_after_shipping_calculator' ); ?&gt;
  </code></pre>
  <p>I was able to add the address field but I can't get it to work, How can I update the user's address from shipping calculator? Shipping is free, I just want to update the address.</p>