Open Codevz opened 3 years ago
What 'number of sales' count are you referring to? Keep in mind that some of these are stored in cache for a short time in order to make the dashboard load more quickly and will be updated when the cache is expired.
Sorry I mean when I delete failed payment, in admin downloads page sales number and earnings of product will decrease. for e.g.
Sorry if I'm missing something obvious, but it does look like it has recalculated correctly? The first screenshot shows 3451 sales and the last one shows 3450 (minus one, and the earnings have gone down by $39).
In your initial report you said it's not recalculating. But in the screenshot you've showed, the numbers have decreased.
The screenshots you provided show what did happen; could you perhaps explain what you expect to happen instead?
I'm sure there is a problem in EDD but I don't know why this happens. I have recorded sample video to show you the problem. Please check out video here: https://vimeo.com/462082865
For test:
two times
refunded
sales
and earnings
, Downloads page will show you 1 sale and $25 earningrefunded
payment, now downloads page will show you 0 sale and $0 earningThanks for the steps @Codevz So the key to replicating is refunding a payment, and then deleting a payment, thinking the action is taken twice on the same payment to reduce stats.
Can you confirm if you go to the Downloads > Tools
page and recalculate the stats for that specific product, if the download now has the proper stats on it? I only ask this to make sure that it's a processing error instead of an actual data error in the database. If what I think is happening, is happening, we're just possibly running the same calculation twice when it should only be run once, but the data for proper stats are still in tact, if we recalculate.
I confirm Downloads > Tools > Recount Earnings and Sales for a download
did it and download item now showing 1 sale, Thanks for your attention.
On our online site, Just found a new problem with number of sales and number of completed payments after
Recount Earnings and Sales for all downloads
2256
2256
But its wrong, because some of payments quantities are different, for example 170 of completed payments are 3 quantity and number of sales should be 2596
but its 2256
In recalculating procedure EDD should calculate number of quantity of each completed payments as number of sales in download item.
Bug Report
When I delete a payment, number of all sales in downloads don't re-calculate and still showing old number.
Information (if a specific version is affected):
PHP Version: 7.2+
EDD Version (or branch): 2.9.25
WordPress Version: 5.5.1