Automattic\WooCommerce\Admin\API

Options::get_item_schema()publicWC 1.0

Get the schema, conforming to JSON Schema.

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

Хуков нет.

Возвращает

Массив.

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

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

Код Options::get_item_schema() WC 8.7.0

public function get_item_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'options',
		'type'       => 'object',
		'properties' => array(
			'options' => array(
				'type'        => 'array',
				'description' => __( 'Array of options with associated values.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
		),
	);

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