Automattic\WooCommerce\Internal\RestApi\Routes\V4

AbstractController::get_item_schemapublicWC 10.2.0

Get item schema, conforming to JSON Schema. Extended by routes.

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

Хуки из метода

Возвращает

Массив. The item schema.

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

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

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

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

Код AbstractController::get_item_schema() WC 11.0.1

public function get_item_schema() {
	// Cache the schema for the route.
	if ( null === $this->schema ) {
		/**
		 * Filter the item schema for this route.
		 *
		 * @param array $schema The item schema.
		 * @since 10.2.0
		 */
		$this->schema = apply_filters( $this->get_hook_prefix() . 'item_schema', $this->add_additional_fields_schema( $this->get_schema() ) );
	}
	return $this->schema;
}