Web Hosting Forum - Net Hosting Talk

We are a community of individuals and businesses passionate about web hosting. Let's build, learn, and grow together.

WooCommerce Zip code address validation in WooCommerce

kathi_mickle

Novice
Member
Hello,

I am from the Netherlands & I've started building a WooCommerce store. I'm encountering issues with 'WooCommerce Zipcode/Postcode Address Validation.'

I've added shipping zones with specific zipcode/postcode ranges, and some of them include wildcards like this:

1951*

1960..1969

1964* (Should be in the range)

Despite this, many clients can still not place orders, even living in the same area. So, I must ask for their zip code/postcode and add a wildcard.

I'm unsure if I did something wrong, if WooCommerce cannot check this, or if I need to purchase a plugin and use an API. If so, do you have any good and affordable suggestions?

Thank you!
 
  • Advertisement
  • I understand that NL postcodes are four digits and two letters, so you must consider them 6-digit numbers.

    When considering your list of postcodes, the range '1960...1969' is just the numbers between one-thousand and sixty to one-thousand and sixty-nine. A postcode like 1964AA is one-hundred and ninety-six thousand, four-hundred and A A, which would be way outside the defined range.

    On the other hand, 1964* works because anything that starts with 1964 will match, including any postcode from 1964AA to 1964ZZ.

    So maybe your range should be 1960AA...1969ZZ.
     
  • Advertisement
  • Advertisement

    Back
    Top