EDD_Payment_Stats::get_sales_by_range( $range = 'today',  $day_by_day = false, string|bool $start_date = false, string|bool $end_date = false, string|array $status = 'publish' )

Retrieve sales stats based on range provided (used for Reporting)


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'


Top ↑

Return Return

(array) Total amount of sales based on the passed arguments.


Top ↑

Source Source

File: includes/payments/class-payment-stats.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.11 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.