WC_REST_Reports_V1_Controller::get_reports()protectedWC 3.5.0

Get reports list.

Метод класса: WC_REST_Reports_V1_Controller{}

Хуков нет.

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_reports();

Список изменений

С версии 3.5.0 Введена.

Код WC_REST_Reports_V1_Controller::get_reports() 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' ),
		),
	);
}