-
Notifications
You must be signed in to change notification settings - Fork 219
Local Pickup: merge country and state into same field in location modal #8408
Local Pickup: merge country and state into same field in location modal #8408
Conversation
We are merging the Country & State fields. So, we should get both default values
We merged both fields in the Pickup Location form modal We can see a similar example in `WooCommerce -> Settings -> General`
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +191 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
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.
Code looks pretty solid - I have some feedback however and some issues that need resolving.
-
If you're already using the pickup locations (in my case I had a location for United States), the new select does not pickup that value. In my case it defaulted to Afganistan.
-
When you select a country/state the summary text uses the codes:
Do you think it's possible to show the full names?
- When you select a country without states the text field appears below the country. Perhaps it might be better above/before the country select.
Thats all!
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.
Same feedback as Mike. Code looks good but the country/state does not update on existing locations.
Thank you, @opr and @mikejolley, for the review! I made the following updates:
I couldn't reproduce the bug you both mentioned! I thought maybe it was a backward compatibility issue, but I added a local pickup address while on the trunk branch, then switched to this branch, and the |
Did you populate the pickup location with a country without a state you can select, one you must type? E.g. choose United Kingdom and enter Cambs as the state/country. |
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label. |
Hello, @mikejolley! 👋 As a follow-up to my last message via Slack: p1678344985194959/1678291671.432779-slack-C8X6Q7XQU, I implemented a fix for the following bug: Bug
FixI mentioned here some potential fixes: p1678344985194959/1678291671.432779-slack-C8X6Q7XQU. I choose eventually to default to the same country (e.g. |
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.
🚢
This PR merges the
Country
andState
fields into the same field in the local pickup modal inWooCommerce -> Settings -> Shipping -> Local pickup -> Pickup locations -> Add pickup location
Some countries have missing states in WooCommerce. If they are selected, we display a
State
text field to add it manually.Fixes #8025
Accessibility
prefers-reduced-motion
Other Checks
Screenshots
Testing
Automated Tests
User Facing Testing
Enable local pickup
inWooCommerce -> Settings -> Shipping -> Local pickup -> General
.Pickup locations
, click onAdd pickup location
. ThePickup location
modal should opendone
, then save changesShipping method
section, selectLocal Pickup
Pickup options
State
text field is displayed. Fill in the form and continue with the rest of the instructions.WooCommerce Visibility
Performance Impact
Changelog