WC_REST_Reports_V1_Controller::get_reports()protectedWC 3.5.0

Get reports list.

Method of the class: WC_REST_Reports_V1_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_V1_Controller::get_reports() code WC 8.7.0

protected function get_reports() {
	return array(
		array(
			'slug'        => 'sales',
			'description' => __( 'List of sales reports.', 'woocommerce' ),
		),
		array(
			'slug'        => 'top_sellers',
			'description' => __( 'List of top sellers products.', 'woocommerce' ),
		),
	);
}