Skip to content

Conversation

@RafaelKayumov
Copy link
Contributor

@RafaelKayumov RafaelKayumov commented Jul 7, 2025

WOOMOB-746

Description

This is a follow up pr for the #15866 and #15872 correspondingly. Addressing the suggestion to handle addresses array as a fallback to support older format.

  • Added decodeAddresses method to conditionally decode map or array of addresses.
  • Added tests to cover the array format for addresses.

Testing steps

I suggest testing on our shared testing store. The order 1951 contains 2 fulfilled shipments with the array format behind selected_destination and selected_origin. Or consider creating an order and purchase labels with the 22.6 prod version. For testing purposes make sure the purchased shipping labels origins / destinations are different.

  • Test on order with previously purchased shipping labels as mentioned above.
  • Navigate to "Create shipping labels" flow
  • Expand bottom sheet to reveal shipment details with origin and destination addresses
  • Switch between fulfilled shipments and make sure that "ship from" and "ship to" display correct addresses.
  • Consider using Proxyman: For reliability I suggest to also check and compare addresses returned in config/label-purchase/{order_id}. Addresses returned in the array format should be correctly presented in "ship from" and "ship to" fields of the corresponding fulfilled shipments.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@RafaelKayumov RafaelKayumov added this to the 22.7 ❄️ milestone Jul 7, 2025
@RafaelKayumov RafaelKayumov added type: bug A confirmed bug. feature: shipping labels Related to creating, ordering, or printing shipping labels. Bug labels Jul 7, 2025
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Number31022
VersionPR #15876
Bundle IDcom.automattic.alpha.woocommerce
Commit119e691
Installation URL2sbfistiqcqs0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@dangermattic
Copy link
Collaborator

dangermattic commented Jul 7, 2025

1 Error
🚫 This PR is tagged with status: do not merge label(s).

Generated by 🚫 Danger

@RafaelKayumov
Copy link
Contributor Author

We reviewed the mapping logic. It seems to be impossible to map addresses to labels basing on the address index. Shipment ids reflect the shipment index within an order. But the addresses are being added to the end of array for a purchased label. So if we purchase a label for the 1st shipment in the order, the index of the address would be N and not 0.

@itsmeichigo itsmeichigo self-assigned this Jul 8, 2025
Base automatically changed from WOOMOB-746-handle-selected-origin to release/22.7 July 8, 2025 08:29
@iamgabrielma iamgabrielma modified the milestones: 22.7 ❄️, 22.8 Jul 11, 2025
@wpmobilebot wpmobilebot modified the milestones: 22.8, 22.9 Jul 11, 2025
@wpmobilebot
Copy link
Collaborator

Version 22.8 has now entered code-freeze, so the milestone of this PR has been updated to 22.9.

@wpmobilebot wpmobilebot deleted the branch release/22.7 July 14, 2025 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug feature: shipping labels Related to creating, ordering, or printing shipping labels. status: do not merge Dependent on another PR, ready for review but not ready for merge. type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants