WordPress at Your Fingertips
function is not described

WC_REST_Reports_V1_Controller::get_reports() protected WC 3.5.0

Get reports list.

{} It's a 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.

Code of WC_REST_Reports_V1_Controller::get_reports() WC 5.9.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' ),
		),
	);
}