WC_REST_Reports_Controller::get_reports() protected WC 3.5.0
Get reports list.
{} It's a 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. |
Code of WC_REST_Reports_Controller::get_reports() WC REST Reports Controller::get reports WC 5.0.0
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;
}