Automattic\WooCommerce\Admin\API

AnalyticsImports::get_retry_failed_schemapublicWC 1.0

Get the schema for the retry-failed endpoint, conforming to JSON Schema.

Method of the class: AnalyticsImports{}

No Hooks.

Returns

array.

Usage

$AnalyticsImports = new AnalyticsImports();
$AnalyticsImports->get_retry_failed_schema();

AnalyticsImports::get_retry_failed_schema() code WC 11.0.1

public function get_retry_failed_schema() {
	$schema = array(
		'$schema'    => 'https://json-schema.org/draft-04/schema#',
		'title'      => 'analytics_import_retry_failed',
		'type'       => 'object',
		'properties' => array(
			'success'                 => array(
				'type'        => 'boolean',
				'description' => __( 'Whether the retry was scheduled successfully.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
			'message'                 => array(
				'type'        => 'string',
				'description' => __( 'Result message.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
			'retried_count'           => array(
				'type'        => 'integer',
				'description' => __( 'Number of orders scheduled for re-import.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
			'pruned_count'            => array(
				'type'        => 'integer',
				'description' => __( 'Number of failed records removed because their orders no longer exist.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
			'already_scheduled_count' => array(
				'type'        => 'integer',
				'description' => __( 'Number of orders skipped because their re-import is already pending.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
			'error_count'             => array(
				'type'        => 'integer',
				'description' => __( 'Number of orders that could not be scheduled for re-import.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
		),
	);

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