Repository navigation
[Backport to release/11.2] Fix the Checkout block rejecting 4-digit Argentine postcodes - #69662
Conversation
Testing GuidelinesHi @jorgeatorres @ralucaStan @woocommerce/monorepo, Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a commit that changes plugin code. |
|
Size Change: 0 B 🆕 Total Size: 0 B |
This PR is a cherry-pick of #69658 to
release/11.2.Original PR Description
Submission Review Guidelines:
Changes proposed in this Pull Request:
A shopper in Argentina who types a four-digit postcode such as
1213in the Checkout block sees "Please enter a valid postcode" and cannot place the order. It happens since 11.2.0, while the Store API accepts the same value.The Checkout block accepts the legacy four-digit Argentine codes again, as it did in 11.1.
postcode-validatorpackage. Unify postcode validation between PHP and Checkout blocks #67780 bumped it from 3.9.2 to 3.10.22, where the Argentina regex made the province letter mandatory. The server has no rule for Argentina.Closes #69643
Closes WOOPLUG-7949
Bug introduced in PR #67780.
How to test the changes in this Pull Request:
1213in Postcode / ZIP and leave the field. On trunk the field shows "Please enter a valid postcode"; with this PR there is no error and the order goes through.C1213ABCis accepted on both;142still shows the error.Testing that has already taken place:
1213,7540rejected) and pass on 3.9.2; the validation and checkout form suites pass (291 tests).generatedFrom.versionline.pnpm install --frozen-lockfilepasses. ESLint clean.1213shows no error, the shipping options load, and the order is placed with postcode1213on both addresses.142shows "Please enter a valid postcode".Milestone
Automatically assign milestone for the next WooCommerce versionChangelog entry
Automatically create a changelog entry from the details below.This Pull Request does not require a changelog entry. (Comment required below)Changelog Entry Comment
Comment
Created manually.
Use of AI Tools
I used Claude Code for the investigation and the change, and I reviewed the diff.