Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Sep 4, 2025

Closes WOOMOB-1261

Description

This PR fixes an issue with parsing data in the response of update shipment endpoint when using REST API.

The cause of the issue is that the response contains data field, so the mapper mistakes it with the data envelope and expects an object instead of string.

The solution is to use do-catch instead when mapping the response.

Testing steps

  • Log in to a test store with Woo Shipping set up using site credentials.
  • Navigate to the Orders tab and select a completed order with more than 1 physical products.
  • Select Split shipments and move items around.
  • Tap Done to save the update.
  • Confirm that saving succeeds and the Split shipments screen is dismissed.

Testing information

Confirmed the fix with simulator iPhone 16 iOS 18.2 and updated the incorrect unit test.

Screenshots

Before:

Simulator.Screen.Recording.-.iPhone.16.-.2025-09-04.at.12.15.42.mp4

After:

Simulator.Screen.Recording.-.iPhone.16.-.2025-09-04.at.11.58.09.mp4

  • 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 23.1 ❄️ milestone Sep 4, 2025
@itsmeichigo itsmeichigo added feature: shipping labels Related to creating, ordering, or printing shipping labels. Bug labels Sep 4, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 4, 2025

1 Warning
⚠️ This PR is assigned to the milestone 23.1 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@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 Numberpr16078-375c97a
Version23.1
Bundle IDcom.automattic.alpha.woocommerce
Commit375c97a
Installation URL32res3edcv3s0
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 September 4, 2025 05:16
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. Confirming the fix resolves shipment updates when logged in with shipment credentials.

@itsmeichigo itsmeichigo merged commit 0e94e0f into release/23.1 Sep 5, 2025
26 checks passed
@itsmeichigo itsmeichigo deleted the woomob-1261-parsing-data-for-update-shipment branch September 5, 2025 02:22
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants