Same problem here!
Also the order of fields are incorrect.
Plugin Author
PostNL
(@postnl)
Hi @roelleor and @keraweb,
Can you send an email to [email protected], it would be possible for me or my colleague to help you with this problem.
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.
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, 5 months ago by
rawsilk.
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:
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, 5 months ago by
roelleor.
@roelleor Yep, also don’t forget: #shipping_address_1_field #shipping_address_2_field as i did initially.