-
Notifications
You must be signed in to change notification settings - Fork 219
Add "Collection from..." in Checkout sidebar when selecting local pickup #8305
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +903 B (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
af015a4
to
edff9a1
Compare
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.
Thank you for working on this Thomas!
Unfortunately the current iteration still includes the (change address)
text and it's confusing because we're showing the local pickup address, which is not something you can change.
I'd refrain from reviewing the code because I know removing (change address)
would switch up and complicate the code a bit more.
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. |
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. |
Hey @senadir thanks for the review and sorry for the delay getting it updated. I fixed it up now so the conflicts are resolved and the change address button is hidden when a local pickup rate is chosen. I will ask someone else to review since you're on rotation. |
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. |
@wavvves thanks for your patience
No, you didn't. The shipping method declared incorrect compatibility, I fixed it now! I also improved the |
Not needed now since pickup_location is included in the setting by default
Old one returned incorrect data shape for prefersCollection
This PR is based on
add/local-pickup-methods
which has a PR here: #8256In this PR I made the following changes:
PickupLocation
component. This will render when the user has chosen "Local pickup" as their shipping method.areRatesCollectible
function outside of theuseShippingData
hook. It made more sense not to create new functions every time the hook is called. For reference, this function which will check whether the selected rate is a collectible one (collectible methods are saved in the site settingcollectibleMethodIds
) - this is required to know whether we should be dispatching the rate change to all packages (if collectible, yes) or just to a single package (if not collectible this is OK).wc/store/checkout
data store'sprefersCollection
selector to check all collectible methods, not justlocal_pickup
ShippingAddress
component, but only ones that cover this PR, new tests should be added to cover some address scenarios (these could be added withinShippingLocation
actually)PickupLocation
Fixes #7997
Screenshots
Testing
Automated Tests
Internal developer Testing
Expand for example shipping method
Group By
option to beProduct (individual)
.Shipping method
, selectShipping
and then select a different rate for each package. It should look like this.8. In the sidebar, ensure you see the shipping total correctly and that it lists both methods for shipping like so:
9. Change shipping method back to `Local Pickup` and ensure that the sidebar updates to only show **one** shipping method name. 10. Select the Amazon locker option and check the sidebar, only one method name should show, and it should also say "Collection from Amazon locker" 11. Choose one of the built-in local pickup rates you set up in step 3. 12. Ensure the sidebar updates and shows the correct method name and shows "Collection from "
User facing testing
Shipping Method
option, select "Shipping"Shipping Method
option, select "Local pickup"WooCommerce Visibility
Performance Impact
Changelog