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

Shoppers receive "order complete" emails when a dispute is closed #7928

Closed
nicdwilson opened this issue Dec 18, 2023 · 8 comments · Fixed by #8308
Closed

Shoppers receive "order complete" emails when a dispute is closed #7928

nicdwilson opened this issue Dec 18, 2023 · 8 comments · Fixed by #8308
Assignees
Labels
category: core WC Payments core related issues, where it’s obvious. component: disputes Issues related to Disputes priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@nicdwilson
Copy link

nicdwilson commented Dec 18, 2023

Description

When a dispute is opened, the order is automatically placed in on-hold here and when the dispute is closed, the order is marked as complete here (where there is a TODO regarding order status).

This retriggers the order completed email. If the order was completed before the dispute was opened, the customer will, on closure of the dispute, receive the email a second time.

How to reproduce

  • Ensure you can see order emails (as shopper). I did this by using a test store (sandbox mode) on Pressable hosting. Could also set up MailHog in local docker environment.
  • Purchase something using a dispute test card. I used 4000000000002685 (triggers not received dispute).
  • Close the dispute. I closed by submitting test winning_evidence.
  • Observe the email received by the shopper - Your [STORE] order is now complete (triggered by the dispute close webhook).

Suggestions for fix

This could be resolved by a filter that would allow a merchant to apply custom statuses to the order, preventing such problems as duplicated emails.

The underlying problem here is that we are using order status for tracking disputes, and this is not directly supported by WooCommerce core (as I understand it). There have been other issues about using a custom status for dispute. May require coordination with core to fix this, though there may be a way to defensively mitigate in WooPayments plugin.

Related issues (disputed status) & work in progress

Additional context

This request comes as a result of #7885 where the merchant is receiving multiple inquiries triggered by return requests in the Klarna app.

@nicdwilson nicdwilson added the type: enhancement The issue is a request for an enhancement. label Dec 18, 2023
@CGA8C
Copy link

CGA8C commented Dec 19, 2023

@souravdebnath1986 it looks like you were pinged for Prioritization on this other issue which is related to this issue.

Could you look at prioritization for this one at the same time, please? :)

@RadoslavGeorgiev
Copy link
Contributor

This issue impacts Disputes, similarly to the linked #7885, so assigning to Helix (based on team responsibilities Pc2DNy-3z-p2) @Automattic/helix.

Assigning as part of Gamma Triage process PcreKM-yM-p2.

@RadoslavGeorgiev RadoslavGeorgiev added component: disputes Issues related to Disputes category: core WC Payments core related issues, where it’s obvious. labels Dec 20, 2023
@seanbelly
Copy link

Another update from ZD-7401002

Another thing we have realized now is that partial refunds don’t change status from on hold to partial refund so, people are unable to pay the existing amount.

The best thing is just if the orders never come in as inquiries in disputes. That would solve everything.

@Jinksi Jinksi changed the title Allow the status of orders with open and closed disputes to be filtered Shoppers receive "order complete" emails when a dispute is closed Jan 2, 2024
@Jinksi
Copy link
Member

Jinksi commented Jan 2, 2024

I've re-titled this issue in an attempt to represent the problem, rather than the solution. Feel free to edit this if I am incorrect.

@csmcneill
Copy link
Contributor

@Jinksi LGTM! Though I wonder if this is a bug instead of an enhancement 🤔

@Jinksi Jinksi added type: bug The issue is a confirmed bug. and removed type: enhancement The issue is a request for an enhancement. labels Jan 4, 2024
@haszari haszari added the priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. label Feb 8, 2024
@haszari
Copy link
Contributor

haszari commented Feb 8, 2024

Marking as high priority because this email is a jarring experience after a dispute. This might be complex to fix and might need work in core, but it's important to get details like this right for shoppers.

@haszari
Copy link
Contributor

haszari commented Feb 13, 2024

Tested this to confirm if this is a general problem or if only applies to specific disputes. I reproduced easily, and this confirms that the bug applies to all/most disputes.

Here's how I tested:

  • Ensure you can see order emails (as shopper). I did this by using a test store (sandbox mode) on Pressable hosting. Could also set up MailHog in local docker environment.
  • Purchase something using a dispute test card. I used 4000000000002685 (triggers not received dispute).
  • Close the dispute. I closed by submitting test winning_evidence.
  • Observe the email received by the shopper - Your [STORE] order is now complete (triggered by the dispute close webhook).

(added these test instructions to issue)

I agree, the order status should not be indiscriminately changed here, and the order completed email would be insensitive / inappropriate depending on the circumstances. Definitely high priority!

@haszari
Copy link
Contributor

haszari commented Feb 13, 2024

Next steps for this issue would be to investigate how we are using order status in dispute flow now, and propose some ideas/options for how we could improve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: core WC Payments core related issues, where it’s obvious. component: disputes Issues related to Disputes priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants