Automattic / woocommerce-payments

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

Reporting: Payment activity widget - refreshing data for Today and Till Date queries #8944

Open nagpai opened 3 months ago

nagpai commented 3 months ago

Description

In its current design, the payment activity widget data refreshes whenever there is no data cached for the start and end date in the query. The data is also refreshed on browser reload.

For queries that are related to Today or __ till date . The end date + time is set as the last minute of today .set( { hour: 23, minute: 59, second: 59, millisecond: 0 } ) - set as todayEndOfDay. This means for a high value merchant, there is a chance of them seeing stale data if they choose any preset that has todayEndofDay set as end. If there are some transactions that happen between them switching between date presets, without reloading the page, they will miss those transactions in the report. This will be however seen, if they refresh the browser.

The issue would first need to discuss what is the best way to refresh the cache - meeting business needs without over-optimizing or causing costly data fetches when it is not needed. A few approaches have been shared in this discussion.

Acceptance criteria

Additional context

8927

jessy-p commented 2 months ago

Not a priority for 7.9 - Live data is not the intent of Payment Activity Card