Add state/county field to addresses #483
Merged
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.
This PR adds state/county support to the shipping and billing addresses.
Just like the zip/postal code this will allow a field named
*_state
(US) or*_county
(UK). As SC defaults to*_zip_code
for zip/postal code this mirrors that convention by defaulting to*_state
.I've also updated the PayPal gateway as the shipping address PayPal provides contains values for both city and state:
https://developer.paypal.com/docs/api/orders/v2/
In most places SC uses the US named fields by default, but there are a couple of places where the UK named fields are used. I've mirrored these because I wanted to be consistent with the conventions already in place in SC, but I'm not sure if any of this needs to be tidied up for consistency?
*_county
*_postal_code
fields, not*_zip_code
fields*_state
but the placeholder is County*_zip_code
field with a placeholder of Postal Code, not Zip Code*_county
*_postal_code
field, not*_zip_code
*_zip_code
and*_state
they wont be updated from the PP data?