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

Reporting: Payment activity widget not refreshed automatically when toggling test mode #9027

Open
nagpai opened this issue Jun 28, 2024 · 0 comments
Labels
category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting type: bug The issue is a confirmed bug.

Comments

@nagpai
Copy link
Contributor

nagpai commented Jun 28, 2024

Describe the bug

When we toggle test/live mode on the client/plugin, the payment activity widget within Payments > Overview continues to show the summary data of the previous mode. This is refreshed after the WooPayments Account cache is refreshed manually.

Expected behavior

The payment widget should update automatically to the test mode / live mode data, whenever it is changed, without needing a manual cache refresh.

To Reproduce

Use a test website connected to a live account

  1. On the client, enable the _wcpay_feature_payment_overview_widget feature flag ( if you are testing this before Enable the Payment Activity Card for all merchants (remove feature flag _wcpay_feature_payment_overview_widget) #9012 is merged )
  2. Check if the client is in test or live mode. Make sure you have some transactions at least in test mode.
  3. Browse to Payments > Overview and take a look at the data within the Your payment activity widget
  4. Using the browser console, or WCPay Dev tools check the value of wcpaySettings.liftetimeTPV or lifetime_total_payment_volume
  5. Toggle the mode
  6. You will notice that the data in the widget does not change
  7. the lifetime TPV values also do not change as checked via steps in (4)
  8. Force update the cache using WCPay Dev Tools, or via WooCommerce > Status > Tools > Clear WooPayments account cache
  9. The widget now shows the correct information. The lifetime TPV updates to the correct value too.

Additional context

The issue was observed while resolving #8958 . I created a separate issue, since I also wanted to context switch to Multiprocessor project, while making sure this is not missed.

@nagpai nagpai added type: bug The issue is a confirmed bug. focus: reporting category: projects For any issues which are part of any project, including bugs, enhancements, etc. labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

1 participant