Automattic\WooCommerce\Admin\API

ActivityPanelCounts::get_item_schema │ public │ WC 1.0

Get the schema for the /activity-panel/counts response.

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

Хуков нет.

Возвращает

array.

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

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

Код ActivityPanelCounts::get_item_schema() WC 11.2.2

public function get_item_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'activity_panel_counts',
		'type'       => 'object',
		'properties' => array(
			'orders_to_fulfill_count'     => array(
				'description' => __( 'Number of orders to fulfill. Null if the underlying sub-request failed.', 'woocommerce' ),
				'type'        => array( 'integer', 'null' ),
			),
			'reviews_to_moderate_count'   => array(
				'description' => __( 'Number of reviews awaiting moderation. Null if the underlying sub-request failed.', 'woocommerce' ),
				'type'        => array( 'integer', 'null' ),
			),
			'products_low_in_stock_count' => array(
				'description' => __( 'Number of products low in stock. Null if the underlying sub-request failed.', 'woocommerce' ),
				'type'        => array( 'integer', 'null' ),
			),
		),
	);

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