Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Churn survey modal and "Are you sure" de-activation modal are displayed at the same time #9347

Open pierorocca opened 3 weeks ago

pierorocca commented 3 weeks ago

Describe the bug

When a merchant de-activates WooPayments, the "are you sure" modal and the churn survey modal appear at the same time. The experience looks broken.

Additionally, unchecking "Enable WooPayments" from the Payment Settings does not trigger the churn survey.

To Reproduce

  1. Navigate to the plugin page
  2. Click deactivate WooPayments plugin
  3. Observe that both modals appear at the same time

Expected behavior

  1. First, the "are you sure" modal is displayed

  2. After the user clicks "yes", the churn survey modal is shown.

  3. Additionally, if the merchant disables WooPayments from the settings page, the churn survey modal should show on save.

    • Double check that unchecking WooPay first, and then unchecking "enable WooPayments" doesn't cause two churn surveys to display. In that scenario, the WooPayments survey should only be shown.
vladolaru commented 2 weeks ago

Further context about the scenario when this happens: it is related to the legacy WCPay Subscriptions functionality. Without having that in use, the "Are you sure?" modal is not shown, only the exit survey is.

anu-rock commented 7 hours ago

I just tested on my local site and JN. I was greeted with only the exit survey. The "are you sure" modal did not appear.

@pierorocca If it's what @vladolaru described, do you agree that we should refactor this issue as a subscription bug?

pierorocca commented 3 hours ago

There are two issues. One the survey doesn't trigger when disabling the gateway, only on deactivation of the plugin. The second is it sounds like there's contention between an older plugin and the new survey. Imo the survey trigger should account for both scenarios. Do we have a sense of size? I wouldn't say this is on subscriptions to fix.