Skip to content

[Shipping labels] Update shipment status after refunding #14199

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 3 commits into
base: issue/WOOMOB-609-fix-inconsistent-currency-in-shipping-labels-flow
Choose a base branch
from

Conversation

irfano
Copy link
Contributor

@irfano irfano commented Jun 13, 2025

Description

This PR fixes the behavior after refunding a label. Previously, when a purchased shipment was refunded and the user returned to the main creation screen, the shipment was still incorrectly displayed as purchased.

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.

The tests that have been performed

Video below

Images/gif

after.webm
  • 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 3 commits June 14, 2025 02:04
This commit updates the `WooShippingLabelCreationFragment` to observe the result of the `WooShippingLabelRefundFragment`.
When a shipping label is successfully refunded, the corresponding shipment's state is reset to reflect that it is no longer purchased.
This ensures the UI accurately represents the current status of the shipping label.
@irfano irfano added this to the 22.7 milestone Jun 13, 2025
@irfano irfano requested a review from hichamboushaba June 13, 2025 23:16
@irfano irfano added feature: shipping labels Related to creating, ordering, or printing shipping labels. Task (new) labels Jun 13, 2025
@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
Commit06cce10
Direct Downloadwoocommerce-wear-prototype-build-pr14199-06cce10.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
Commit06cce10
Direct Downloadwoocommerce-prototype-build-pr14199-06cce10.apk

Comment on lines +580 to +584
labelId = null,
carrierId = null,
trackingNumber = null,
purchaseState = PurchaseState.NoStarted,
status = ShippingLabelStatus.UNKNOWN
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don’t focus too much on this part, as it has been changed in the following PR: 1fcf8de

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. Task (new)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants