EDD_Payment_Stats::get_sales( int $download_id, string|bool $start_date = false, string|bool $end_date = false, string|array $status = 'publish' )
Retrieve sale 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
- $status
-
(Optional) The sale status(es) to count. Only valid when retrieving global stats
Default value: 'publish'
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. |