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

Automattic\WooCommerce\Blocks\StoreApi\Schemas

ProductCollectionDataSchema::get_properties() public WC 1.0

Product collection data schema properties.

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

Хуков нет.

Возвращает

Массив.

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

$ProductCollectionDataSchema = new ProductCollectionDataSchema();
$ProductCollectionDataSchema->get_properties();

Код ProductCollectionDataSchema::get_properties() WC 4.7.1

<?php
public function get_properties() {
	return [
		'price_range'      => [
			'description' => __( 'Min and max prices found in collection of products, provided using the smallest unit of the currency.', 'woocommerce' ),
			'type'        => [ 'object', 'null' ],
			'context'     => [ 'view', 'edit' ],
			'readonly'    => true,
			'properties'  => array_merge(
				$this->get_store_currency_properties(),
				[
					'min_price' => [
						'description' => __( 'Min price found in collection of products.', 'woocommerce' ),
						'type'        => 'string',
						'context'     => [ 'view', 'edit' ],
						'readonly'    => true,
					],
					'max_price' => [
						'description' => __( 'Max price found in collection of products.', 'woocommerce' ),
						'type'        => 'string',
						'context'     => [ 'view', 'edit' ],
						'readonly'    => true,
					],
				]
			),
		],
		'attribute_counts' => [
			'description' => __( 'Returns number of products within attribute terms.', 'woocommerce' ),
			'type'        => [ 'array', 'null' ],
			'context'     => [ 'view', 'edit' ],
			'readonly'    => true,
			'items'       => [
				'type'       => 'object',
				'properties' => [
					'term'  => [
						'description' => __( 'Term ID', 'woocommerce' ),
						'type'        => 'integer',
						'context'     => [ 'view', 'edit' ],
						'readonly'    => true,
					],
					'count' => [
						'description' => __( 'Number of products.', 'woocommerce' ),
						'type'        => 'integer',
						'context'     => [ 'view', 'edit' ],
						'readonly'    => true,
					],
				],
			],
		],
		'rating_counts'    => [
			'description' => __( 'Returns number of products with each average rating.', 'woocommerce' ),
			'type'        => [ 'array', 'null' ],
			'context'     => [ 'view', 'edit' ],
			'readonly'    => true,
			'items'       => [
				'type'       => 'object',
				'properties' => [
					'rating' => [
						'description' => __( 'Average rating', 'woocommerce' ),
						'type'        => 'integer',
						'context'     => [ 'view', 'edit' ],
						'readonly'    => true,
					],
					'count'  => [
						'description' => __( 'Number of products.', 'woocommerce' ),
						'type'        => 'integer',
						'context'     => [ 'view', 'edit' ],
						'readonly'    => true,
					],
				],
			],
		],
	];
}