Automattic\WooCommerce\Admin\Features\Blueprint

RestApi::get_process_response_schema()publicWC 1.0

Get the schema for the process endpoint.

Method of the class: RestApi{}

No Hooks.

Return

Array.

Usage

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

RestApi::get_process_response_schema() code WC 9.7.1

public function get_process_response_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'process',
		'type'       => 'object',
		'properties' => array(
			'processed' => array(
				'type' => 'boolean',
			),
			'message'   => array(
				'type' => 'string',
			),
			'data'      => array(
				'type'       => 'object',
				'properties' => array(
					'redirect' => array(
						'type' => 'string',
					),
					'result'   => array(
						'type' => 'array',
					),
				),
			),
		),
	);
	return $schema;
}