Automattic\WooCommerce\Admin\API\Reports\Export

Controller::get_export_status_public_schema()publicWC 1.0

Get the Export status schema, conforming to JSON Schema.

Method of the class: Controller{}

No Hooks.

Return

Array.

Usage

$Controller = new Controller();
$Controller->get_export_status_public_schema();

Controller::get_export_status_public_schema() code WC 8.7.0

public function get_export_status_public_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'report_export_status',
		'type'       => 'object',
		'properties' => array(
			'percent_complete' => array(
				'description' => __( 'Percentage complete.', 'woocommerce' ),
				'type'        => 'int',
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
			),
			'download_url'     => array(
				'description' => __( 'Export download URL.', 'woocommerce' ),
				'type'        => 'string',
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
			),
		),
	);

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