-
Notifications
You must be signed in to change notification settings - Fork 69
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
Only display "refund manually" button after refund failure. #426
Comments
This seems like a must-have for V1, right? |
@allendav yep! |
We'll probably want to (conditionally?) enqueue some JS here to hide |
We'll want to track that there's been a refund failure in order meta, I think, as currently |
That's correct. We also have an issue for expanding that behaviour to cover things like changing the order status (#601). Tracking the refund failure in order meta would make sense, the only downside I can see would be the chance of the refund failing and then the webhook failing. That would leave the merchant with a refund failure transaction in their dashboard, but no way to resolve it. As an alternative solution, would it be worth considering tracking the fact that the merchant simply attempted to refund through WCPay instead? The first time they try to refund, they would only see the "Refund with WCPay" button. The UI will update to show that the refund attempt was submitted successfully. Presumably the merchant wouldn't attempt to refund again, so we could show the manual refund button at that point. That would be more robust, but at the risk of making the UI more confusing. Also, do we need to consider partial refunds as part of this? It's not something I've played around with much. |
This issue is causing support tickets as mentioned in p6q7sZ-7TF-p2 |
one customer has an issue with this in 3837596-zen |
It happened in this ticket too: 3831519-zen |
Likely cause of the issue in pbUcTB-f4-p2 |
I don't think counting attempts is enough. What if they do a partial refund? Once the partial refund has been completed, they'd now see the Manual Refund button. I guess we could reset the attempt counter once the webhook is successfully handled? But even then I think it'd be more robust to check for failures. Webhook delivery issues will always cause problems, no matter what we do about it. That said, we could always count both the attempts and failures and somehow tally the numbers to make a more intelligent decision about which buttons to show.
I wonder what @LevinMedia's thoughts are on this UX. Is it better to:
I think so. Just thinking about it I could see partial refunds messing with some of the proposed solutions. I think the simplest one (least amount of edge cases) is the "only show manual refund after failure" approach. Other approaches might be more robust, but will require more detailed handling. |
@reykjalin I agree - given that the likelyhood of a refund failing at the same time a webhook is low - I think we can move forward with this approach. |
Occurrence in 29406563-hc |
Per Stripe: the only time a payment made with WooCommerce payments can be refunded manually should be after a refund via the gateway has failed.
cc: @allendav @thenbrent @bmccotter
The text was updated successfully, but these errors were encountered: