-
Notifications
You must be signed in to change notification settings - Fork 130
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
[Woo POS][Non-Simple Products] Redirect to Items screen after cash payment #13256
Conversation
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #13256 +/- ##
=========================================
Coverage 40.67% 40.67%
Complexity 6396 6396
=========================================
Files 1351 1351
Lines 77664 77666 +2
Branches 10682 10682
=========================================
+ Hits 31587 31591 +4
+ Misses 43291 43289 -2
Partials 2786 2786 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank, LGTM!
@@ -200,6 +202,11 @@ class WooPosHomeViewModel @Inject constructor( | |||
} | |||
|
|||
private fun onOrderSuccessfullyPaid(paymentMethod: PaymentMethod) { | |||
viewModelScope.launch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to move this logic here, instead of duplicating it for card and cash payments on the calling site!
Closes: #13255
Description
This PR updates the navigation logic to ensure that, after a successful payment (via card or cash), users are redirected internally to the Items List screen. This guarantees that when users click on the "New Order" button on the success screen, they are returned directly to the Items List screen, bypassing any intermediate screens like the Variations screen visited during the previous checkout flow.
Steps to reproduce
Card payment
Cash payment
The tests that have been performed
Tested above scenarios both on Light and Dark modes
Images/gif
redirect_after_successful_payment.mp4
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.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: