Skip to content

Shipping Labels: Sync shipments #15899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 15, 2025
Merged

Shipping Labels: Sync shipments #15899

merged 5 commits into from
Jul 15, 2025

Conversation

itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Jul 11, 2025

Part of WOOMOB-754

Description

This PR continues the work in #15897 to add support for syncing shipments on the order details screen. Changes include:

  • Replaces the sync shipping label action with sync shipments inWooShippingStore.
  • Updates OrderDetailsViewModel to sync shipments if a store has the Woo Shipping extension.
  • Updates OrderDetailsViewControllers to fetch shipments from storage and update shipping labels from the fetched shipments.

Testing steps

  • Log in to a test store with Woo Shipping extension set up.
  • Navigate to the Orders tab and select an order with shipping labels created.
  • Confirm that the shipping labels are displayed on the order details screen. If a shipment in the order has more than one labels, only the latest is displayed.
  • Tap View purchased shipping label and confirm that the matching shipment is opened.

Testing information

  • Tested and confirmed with simulator iPhone 16 iOS 18.4.
  • Updated unit tests related to syncing shipping labels to syncing shipments.

Screenshots

No UI changes


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

@itsmeichigo itsmeichigo added this to the 22.9 milestone Jul 11, 2025
@itsmeichigo itsmeichigo added type: task An internally driven task. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Jul 11, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jul 11, 2025

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 Numberpr15899-62a87ec
Version22.7
Bundle IDcom.automattic.alpha.woocommerce
Commit62a87ec
Installation URL5niul5epc78oo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo marked this pull request as ready for review July 14, 2025 03:39
Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The main flow works normal.

func syncShipmentsForWooShipping() {
stores.dispatch(WooShippingAction.syncShipments(siteID: order.siteID, orderID: order.orderID) { result in
switch result {
case .success(let shipments):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: the shipments is not used here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll remove this in the next PR that depends on this branch.

Base automatically changed from woomob-754-new-entity-wooshippingshipment to trunk July 15, 2025 02:53
@itsmeichigo itsmeichigo merged commit f26de3a into trunk Jul 15, 2025
16 checks passed
@itsmeichigo itsmeichigo deleted the woomob-754-sync-shipments branch July 15, 2025 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: shipping labels Related to creating, ordering, or printing shipping labels. type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants