Skip to content

[Shipping labels] Fix inconsistent currency in shipping labels flow #14198

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

Open
wants to merge 5 commits into
base: issue/WOOMOB-370-handle-displaying-refunded-shipments
Choose a base branch
from

Conversation

irfano
Copy link
Contributor

@irfano irfano commented Jun 13, 2025

Closes WOOMOB-609

Description

This makes following chages:

  • Removes the ShipmentUIModel parameter from WooShippingLabelRefundFragment arguments. The fragment is now initialized with only labelId and orderId.
  • Uses the currency from shipping label data on the refund screen. This value comesshippingLabelData parameter in the config endpoint response. Before, the screen incorrectly used the order’s currency.
  • Displays shipping rates using the currency defined in store options. Before, the rates were shown using the order’s currency, which was incorrect.

Steps to reproduce

  1. Open the Orders screen.
  2. Select an order that includes a purchased shipment.
  3. Tap the "Request refund" button.
  4. Tap the "Refund label" button.
  5. Confirm that the amount is displayed using the currency from the label purchase.
  6. Navigate back.
  7. Fill in the address, package, and other necessary fields to display shipping rates.
  8. Confirm that the shipping rates are listed using the store’s currency.

The tests that have been performed

Steps above

Images/gif

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

irfano added 5 commits June 14, 2025 00:01
This commit refactors the navigation to the shipping label refund request screen. Instead of passing the entire `ShipmentUIModel` object, only the necessary `labelId` and `orderId` are now passed.
This commit changes the source of the currency code used for fetching shipping rates. Previously, it used the order's currency. Now, it uses the currency specified in the account settings. This ensures consistency when fetching rates, especially in scenarios where the order currency might differ from the store's default currency.
@irfano irfano added this to the 22.7 milestone Jun 13, 2025
@irfano irfano requested a review from hichamboushaba June 13, 2025 22:05
@irfano irfano added type: bug A confirmed 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. labels Jun 13, 2025
@dangermattic
Copy link
Collaborator

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

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit78e17bb
Direct Downloadwoocommerce-wear-prototype-build-pr14198-78e17bb.apk

@wpmobilebot
Copy link
Collaborator

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

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit78e17bb
Direct Downloadwoocommerce-prototype-build-pr14198-78e17bb.apk

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. 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.

3 participants