Title: Bug: Original fields not hidden on page load on checkout page
Last modified: November 21, 2018

---

# Bug: Original fields not hidden on page load on checkout page

 *  [roelleor](https://wordpress.org/support/users/roelleor/)
 * (@roelleor)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/)
 * On the woocommerce checkout page, both the dutch fields and the original fields
   are shown:
 * Dutch fields:
    billing_street_name billing_house_number_field billing_house_number_field_suffix
 * Original fields:
    billing_address_1_field billing_address_2_field
 * The expected behavior is that the original fields are hidden. This is indeed 
   the case when re-selecting the country.
    -  This topic was modified 7 years, 6 months ago by [roelleor](https://wordpress.org/support/users/roelleor/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbug-228%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/#post-10926486)
 * Same problem here!
    Also the order of fields are incorrect.
 *  Plugin Author [PostNL](https://wordpress.org/support/users/postnl/)
 * (@postnl)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/#post-10929167)
 * Hi [@roelleor](https://wordpress.org/support/users/roelleor/) and [@keraweb](https://wordpress.org/support/users/keraweb/),
 * Can you send an email to [support@postnl-plugins.nl](https://wordpress.org/support/topic/bug-228/support@postnl-plugins.nl?output_format=md),
   it would be possible for me or my colleague to help you with this problem.
 *  [nietbelangrijk](https://wordpress.org/support/users/nietbelangrijk/)
 * (@nietbelangrijk)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/#post-10934065)
 * Postnl snapt het hele open-source gedoe nog niet helemaal.
    Support is via deze
   pagina’s, niet via een e-mail adres.
 * Verder ontgaat het me volledig waarom er in een soort Engels wordt geconverseerd,
   het is een specifiek Nederlandse plugin. Nederlands zou daarom de voertaal moeten
   zijn.
 *  [rawsilk](https://wordpress.org/support/users/rawsilk/)
 * (@rawsilk)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/#post-10941270)
 * Zal ik dan maar even antwoord geven:
 *     ```
       jQuery( document ).ready(function(){
           if (jQuery('#billing_country').val() == 'NL') {
               jQuery("#billing_address_1_field, #billing_address_2_field").hide();
           }
           else jQuery("#billing_address_1_field, #billing_address_2_field").show();
       });
       ```
   
    -  This reply was modified 7 years, 6 months ago by [rawsilk](https://wordpress.org/support/users/rawsilk/).
 *  Thread Starter [roelleor](https://wordpress.org/support/users/roelleor/)
 * (@roelleor)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/#post-10948249)
 * For a complete temporal fix solution (note: this does not fix the field order
   issue):
    `add_action( 'wp_enqueue_scripts', ['my_enqueue_scripts'] );`
 *     ```
       function my_enqueue_scripts()
           {
               if (is_checkout()) {
                   wp_enqueue_script('mypostnlfix', '/path/to/postnlfix.js', [],
                       'my-version', true);
               }
           }
       ```
   
 * and the script I modified a tiny bit from [@rawsilk](https://wordpress.org/support/users/rawsilk/):
 *     ```
       jQuery(document).ready(function($) {
           try {
               if ($('#billing_country').val() == 'NL') {
                   $("#billing_address_1_field, #billing_address_2_field").hide();
               }
               else $("#billing_address_1_field, #billing_address_2_field").show();
           } catch (e) {
               // pass
           }
       });
       ```
   
    -  This reply was modified 7 years, 6 months ago by [roelleor](https://wordpress.org/support/users/roelleor/).
 *  [rawsilk](https://wordpress.org/support/users/rawsilk/)
 * (@rawsilk)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/#post-10948277)
 * [@roelleor](https://wordpress.org/support/users/roelleor/) Yep, also don’t forget:#
   shipping_address_1_field #shipping_address_2_field as i did initially.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Bug: Original fields not hidden on page load on checkout page’ is closed
to new replies.

 * ![](https://ps.w.org/woo-postnl/assets/icon-256x256.png?rev=1807921)
 * [PostNL for WooCommerce](https://wordpress.org/plugins/woo-postnl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-postnl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-postnl/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-postnl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-postnl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-postnl/reviews/)

## Tags

 * [quick fix](https://wordpress.org/support/topic-tag/quick-fix/)

 * 6 replies
 * 5 participants
 * Last reply from: [rawsilk](https://wordpress.org/support/users/rawsilk/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/bug-228/#post-10948277)
 * Status: not resolved