|
@@ 2014-2024 (lines=11) @@
|
| 2011 |
|
* @since 1.1 |
| 2012 |
|
* @return array default sales statistics |
| 2013 |
|
*/ |
| 2014 |
|
private function get_default_sales_stats() { |
| 2015 |
|
|
| 2016 |
|
// Default sales return |
| 2017 |
|
$donations = array(); |
| 2018 |
|
$donations['donations']['today'] = $this->stats->get_sales( 0, 'today' ); |
| 2019 |
|
$donations['donations']['current_month'] = $this->stats->get_sales( 0, 'this_month' ); |
| 2020 |
|
$donations['donations']['last_month'] = $this->stats->get_sales( 0, 'last_month' ); |
| 2021 |
|
$donations['donations']['totals'] = give_get_total_donations(); |
| 2022 |
|
|
| 2023 |
|
return $donations; |
| 2024 |
|
} |
| 2025 |
|
|
| 2026 |
|
/** |
| 2027 |
|
* Generate the default earnings stats returned by the 'stats' endpoint |
|
@@ 2033-2043 (lines=11) @@
|
| 2030 |
|
* @since 1.1 |
| 2031 |
|
* @return array default earnings statistics |
| 2032 |
|
*/ |
| 2033 |
|
private function get_default_earnings_stats() { |
| 2034 |
|
|
| 2035 |
|
// Default earnings return |
| 2036 |
|
$earnings = array(); |
| 2037 |
|
$earnings['earnings']['today'] = $this->stats->get_earnings( 0, 'today' ); |
| 2038 |
|
$earnings['earnings']['current_month'] = $this->stats->get_earnings( 0, 'this_month' ); |
| 2039 |
|
$earnings['earnings']['last_month'] = $this->stats->get_earnings( 0, 'last_month' ); |
| 2040 |
|
$earnings['earnings']['totals'] = give_get_total_earnings(); |
| 2041 |
|
|
| 2042 |
|
return $earnings; |
| 2043 |
|
} |
| 2044 |
|
|
| 2045 |
|
/** |
| 2046 |
|
* API Key Backwards Compatibility |