WC_REST_Reports_Controller::get_reports()
Get reports list.
Method of the class: WC_REST_Reports_Controller{}
No Hooks.
Return
Array
.
Usage
// protected - for code of main (parent) or child class $result = $this->get_reports();
Changelog
Since 3.5.0 | Introduced. |
WC_REST_Reports_Controller::get_reports() WC REST Reports Controller::get reports code WC 9.7.1
protected function get_reports() { $reports = parent::get_reports(); $reports[] = array( 'slug' => 'orders/totals', 'description' => __( 'Orders totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'products/totals', 'description' => __( 'Products totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'customers/totals', 'description' => __( 'Customers totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'coupons/totals', 'description' => __( 'Coupons totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'reviews/totals', 'description' => __( 'Reviews totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'categories/totals', 'description' => __( 'Categories totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'tags/totals', 'description' => __( 'Tags totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'attributes/totals', 'description' => __( 'Attributes totals.', 'woocommerce' ), ); return $reports; }