Automattic\WooCommerce\Admin\Features\Blueprint

RestApi::get_import_step_response_schema()publicWC 1.0

Get the schema for the import-step endpoint.

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

Хуков нет.

Возвращает

Массив.

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

$RestApi = new RestApi();
$RestApi->get_import_step_response_schema();

Код RestApi::get_import_step_response_schema() WC 9.8.5

public function get_import_step_response_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'import-step',
		'type'       => 'object',
		'properties' => array(
			'success'  => array(
				'type' => 'boolean',
			),
			'messages' => array(
				'type'  => 'array',
				'items' => array(
					'type'       => 'object',
					'properties' => array(
						'message' => array(
							'type' => 'string',
						),
						'type'    => array(
							'type' => 'string',
						),
					),
					'required'   => array( 'message', 'type' ),
				),
			),
		),
		'required'   => array( 'success', 'messages' ),
	);
	return $schema;
}