EDD_Payment_Stats::get_earnings( int $download_id, string|bool $start_date = false, string|bool $end_date = false, bool $include_taxes = true )
Retrieve earning stats
Description Description
Parameters Parameters
- $download_id
-
(Required) The download product to retrieve stats for. If false, gets stats for all products
- $start_date
-
(Optional) The starting date for which we'd like to filter our sale stats. If false, we'll use the default start date of
this_month
Default value: false
- $end_date
-
(Optional) The end date for which we'd like to filter our sale stats. If false, we'll use the default end date of
this_month
Default value: false
- $include_taxes
-
(Optional) If taxes should be included in the earnings graphs
Default value: true
Return Return
(float|int) Total amount of sales based on the passed arguments.
Source Source
File: includes/payments/class-payment-stats.php
Changelog Changelog
Version | Description |
---|---|
1.8 | Introduced. |