WC_REST_Controller::get_public_batch_schema()publicWC 1.0

Get the batch schema, conforming to JSON Schema.

Method of the class: WC_REST_Controller{}

No Hooks.

Return

Array.

Usage

$WC_REST_Controller = new WC_REST_Controller();
$WC_REST_Controller->get_public_batch_schema();

WC_REST_Controller::get_public_batch_schema() code WC 8.7.0

public function get_public_batch_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'batch',
		'type'       => 'object',
		'properties' => array(
			'create' => array(
				'description' => __( 'List of created resources.', 'woocommerce' ),
				'type'        => 'array',
				'context'     => array( 'view', 'edit' ),
				'items'       => array(
					'type'    => 'object',
				),
			),
			'update' => array(
				'description' => __( 'List of updated resources.', 'woocommerce' ),
				'type'        => 'array',
				'context'     => array( 'view', 'edit' ),
				'items'       => array(
					'type'    => 'object',
				),
			),
			'delete' => array(
				'description' => __( 'List of delete resources.', 'woocommerce' ),
				'type'        => 'array',
				'context'     => array( 'view', 'edit' ),
				'items'       => array(
					'type'    => 'integer',
				),
			),
		),
	);

	return $schema;
}