@@ 2079-2089 (lines=11) @@ | ||
2076 | * @since 1.1 |
|
2077 | * @return array default sales statistics |
|
2078 | */ |
|
2079 | private function get_default_sales_stats() { |
|
2080 | ||
2081 | // Default sales return |
|
2082 | $donations = array(); |
|
2083 | $donations['donations']['today'] = $this->stats->get_sales( 0, 'today' ); |
|
2084 | $donations['donations']['current_month'] = $this->stats->get_sales( 0, 'this_month' ); |
|
2085 | $donations['donations']['last_month'] = $this->stats->get_sales( 0, 'last_month' ); |
|
2086 | $donations['donations']['totals'] = give_get_total_donations(); |
|
2087 | ||
2088 | return $donations; |
|
2089 | } |
|
2090 | ||
2091 | /** |
|
2092 | * Generate the default earnings stats returned by the 'stats' endpoint |
|
@@ 2098-2108 (lines=11) @@ | ||
2095 | * @since 1.1 |
|
2096 | * @return array default earnings statistics |
|
2097 | */ |
|
2098 | private function get_default_earnings_stats() { |
|
2099 | ||
2100 | // Default earnings return |
|
2101 | $earnings = array(); |
|
2102 | $earnings['earnings']['today'] = $this->stats->get_earnings( 0, 'today' ); |
|
2103 | $earnings['earnings']['current_month'] = $this->stats->get_earnings( 0, 'this_month' ); |
|
2104 | $earnings['earnings']['last_month'] = $this->stats->get_earnings( 0, 'last_month' ); |
|
2105 | $earnings['earnings']['totals'] = give_get_total_earnings(); |
|
2106 | ||
2107 | return $earnings; |
|
2108 | } |
|
2109 | ||
2110 | /** |
|
2111 | * API Key Backwards Compatibility |