Canadian Post Code not Working
-
I have found a problem with Canadian Post Codes that can be reproduced.
Please try it out!
Canadian post codes are alphanumeric strings, for example: S7N1G8To reproduce the problem, create the following scenario:
Number of post code groups: 1 Number of state groups: 0 Number of country groups: 1
Then add these values to them:
P1: S7N1G8 C1: Canada
In the Shipping Rates use:
5000|1.00|P1 5000|2.00|C1
Then add a product that is less than 5000 in weight (I am using g and mm as units) to the shopping cart.
If you use the exact post code “S7N1G8” that is defined in the P1, the plugin should return the shipping cost US$1.00, but instead it returns US$2.00 because it matched the country, not the post code. I have also tried to use P1=S7N* but it did not work either!
I believe this has something to do with the way the Post Code validation is defined for Canada because I did the following experiment and it then worked:
Change P1 to “33300” and C1 to “United States”… then everything works fine and the valued returned is US$1.00.
Please investigate.
https://www.ads-software.com/plugins/woocommerce-apg-weight-and-postcodestatecountry-shipping/
- The topic ‘Canadian Post Code not Working’ is closed to new replies.