Method | Description | |
---|---|---|
get_best_selling ( $number = 10 ) : array | Get the best selling forms | |
get_earnings ( $form_id, $start_date = false, $end_date = false, $gateway_id = false ) : float | integer | Retrieve earning stats | |
get_sales ( $form_id, $start_date = false, $end_date = false, $status = 'publish' ) : float | integer | Retrieve sale stats |
public get_best_selling ( $number = 10 ) : array | ||
$number | int The number of results to retrieve with the default set to 10. | |
return | array | Best selling forms |
public get_earnings ( $form_id, $start_date = false, $end_date = false, $gateway_id = false ) : float | integer | ||
$form_id | int The donation form to retrieve stats for. If false, gets stats for all forms | |
$start_date | string|bool The starting date for which we'd like to filter our donation earnings stats. If false, we'll use the default start date of `this_month` | |
$end_date | string|bool 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` | |
$gateway_id | string|bool The gateway to get earnings for such as 'paypal' or 'stripe' | |
return | float | integer | Total amount of donations based on the passed arguments. |
public get_sales ( $form_id, $start_date = false, $end_date = false, $status = 'publish' ) : float | integer | ||
$form_id | int The donation form to retrieve stats for. If false, gets stats for all forms | |
$start_date | string|bool 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` | |
$end_date | string|bool 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` | |
$status | string|array The sale status(es) to count. Only valid when retrieving global stats | |
return | float | integer | Total amount of donations based on the passed arguments. |