This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
ralucaStan
approved these changes
Oct 19, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things look good. I've tested and things looked as expected
github-actions
bot
added
status: ready to merge
and removed
status: needs review
labels
Oct 19, 2021
mikejolley
force-pushed
the
fix/state-validation-from-server
branch
from
October 19, 2021 11:31
1b63f7c
to
e3aea72
Compare
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 14, 2021
* Enforce valid states from the API * Remove paypal from test
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I came across an issue similar to #4753 (which was fixed in #4761) where state validation was breaking requests. In this case, I had an invalid billing address in the client state when using the shipping calculator (which only posts shipping addresses).
Turns out this was because I had an invalid address state coming from the Rest API and then being stored in the client. We should fix this at API level and only return the address state if valid.
How to test the changes in this Pull Request:
Tricky to test this one. You need to have somehow had an invalid state stored in your session. Probably need to just smoke test the customer responses from the API and ensure shipping and billing states are still returned.
Changelog