Closed beechyrb closed 2 years ago
Hi @beechyrb, thanks for reporting this issue! We'll take a look.
@beechyrb We were able to reproduce the issue and have implemented the fix you've described. It will be included in our next patch release v1.9.7. Thank you again for contributing!
Prerequisites
Description
We have had multiple instances where customers bypassed the tax calculation at the checkout by adding a space before a postcode like this " 90230". The TaxJar API supports spaces however the
_validatePostcode
function in the "Model/Smartcalcs.php" file does not support the space and therefore skips tax calculations. We have had a patch on this function for a few years now to trim the postcode entered by the customer and it seems to be working fine. I would suggest this be added by default as I don't believe there are any countries that have postcodes with a space at the beginning or the end.Steps to Reproduce
Expected Result
For the tax to be calculated on the order
Actual Result
Tax calculations are skipped due to failing the
_validatePostcode
functionVersions