awesomemotive / easy-digital-downloads

Sell digital downloads through WordPress
https://easydigitaldownloads.com
GNU General Public License v2.0
868 stars 472 forks source link

Download Report Tiles and Download settings sales and earnings are not accurate #9424

Closed dgoldak closed 2 years ago

dgoldak commented 2 years ago

Update get_order_item_count and get_order_item_earnings to be more consistent with dashboard reports.

Both sections should match in this screenshot: Markup on 2022-09-07 at 16:09:58

https://secure.helpscout.net/conversation/2000520514/2149135?folderId=5747299

cklosowski commented 2 years ago

@robincornett @zkawesome I think we have a situation here that we ran into with the Overview tiles.

See here where these EDD\Stats->get_order_item_earnings() calls have only a single status set, and other missing logic that we've added to the other get_order_earnings() methods:

https://github.com/awesomemotive/easy-digital-downloads/blob/main/includes/class-stats.php#L919-L925