WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Admin\API\Reports\Customers\Stats

Controller::get_item_schema() public WC 1.0

Get the Report's schema, conforming to JSON Schema.

{} Это метод класса: Controller{}

Хуков нет.

Возвращает

Массив.

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

$Controller = new Controller();
$Controller->get_item_schema();

Код Controller::get_item_schema() WC 4.7.0

<?php
public function get_item_schema() {
	// @todo Should any of these be 'indicator's?
	$totals = array(
		'customers_count'     => array(
			'description' => __( 'Number of customers.', 'woocommerce' ),
			'type'        => 'integer',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
		),
		'avg_orders_count'    => array(
			'description' => __( 'Average number of orders.', 'woocommerce' ),
			'type'        => 'integer',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
		),
		'avg_total_spend'     => array(
			'description' => __( 'Average total spend per customer.', 'woocommerce' ),
			'type'        => 'number',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
			'format'      => 'currency',
		),
		'avg_avg_order_value' => array(
			'description' => __( 'Average AOV per customer.', 'woocommerce' ),
			'type'        => 'number',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
			'format'      => 'currency',
		),
	);

	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'report_customers_stats',
		'type'       => 'object',
		'properties' => array(
			'totals' => array(
				'description' => __( 'Totals data.', 'woocommerce' ),
				'type'        => 'object',
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
				'properties'  => $totals,
			),
		),
	);

	return $this->add_additional_fields_schema( $schema );
}