Skip to content
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

[Shipping Labels] Send country code in customs form #15466

Merged
merged 2 commits into from
Apr 2, 2025

Conversation

selanthiraiyan
Copy link
Contributor

@selanthiraiyan selanthiraiyan commented Apr 1, 2025

Closes: #15382

Description

While sending the customs form information to remote, we were sending country name. The endpoint expects ISO country code instead. This resulted in an error while loading shipping label rates.

This PR starts sending country code instead of country name.

Steps to reproduce

  • Log in to a test store with Woo Shipping set up.
  • Create an order with the destination country outside of the US.
  • Open the order from the mobile app.
  • Navigate to the create shipping labels flow.
  • Fill out the customs form.
  • Select the package and enter the weight.
  • Validate that shipping rates are loaded successfully.
  • Select a price and finish purchasing the shipping label.

Testing information

  • Validated that the label rates are loaded successfully.
  • Validated that the shipping label can be purchased successfully and the customs form details are sent while sending the purchase request.

Screenshots

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-04-01.at.13.21.20.mp4

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

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

@selanthiraiyan selanthiraiyan added the feature: shipping labels Related to creating, ordering, or printing shipping labels. label Apr 1, 2025
@selanthiraiyan selanthiraiyan added this to the 22.1 milestone Apr 1, 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 Number29111
VersionPR #15466
Bundle IDcom.automattic.alpha.woocommerce
Commit8b2ae64
Installation URL582nkgf0q6epo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@selanthiraiyan selanthiraiyan marked this pull request as ready for review April 1, 2025 08:13
@itsmeichigo itsmeichigo self-assigned this Apr 2, 2025
Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

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

Tested and confirmed that loading shipping rates and purchasing a label with a customs form succeeded.

@selanthiraiyan selanthiraiyan merged commit 3eb5d07 into trunk Apr 2, 2025
15 checks passed
@selanthiraiyan selanthiraiyan deleted the task/15382-customs-schema branch April 2, 2025 03:37
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update customs schema
3 participants