WC_REST_Products_Catalog_Controller::catalog_schemapublicWC 1.0

Products catalog schema.

Method of the class: WC_REST_Products_Catalog_Controller{}

No Hooks.

Returns

Array. Products catalog schema data.

Usage

$WC_REST_Products_Catalog_Controller = new WC_REST_Products_Catalog_Controller();
$WC_REST_Products_Catalog_Controller->catalog_schema();

WC_REST_Products_Catalog_Controller::catalog_schema() code WC 10.4.3

public function catalog_schema() {
	return array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'products_catalog',
		'type'       => 'object',
		'properties' => array(
			'status'       => array(
				'description' => __( 'Products catalog generation status.', 'woocommerce' ),
				'type'        => 'string',
				'enum'        => array( 'pending', 'processing', 'complete', 'failed' ),
			),
			'download_url' => array(
				'description' => __( 'Products catalog file URL. Null when catalog is not ready.', 'woocommerce' ),
				'type'        => array( 'string', 'null' ),
				'format'      => 'uri',
			),
		),
		'required'   => array( 'status', 'download_url' ),
	);
}