Automattic\WooCommerce\Admin

ReportsSync::get_schedulers()public staticWC 1.0

Get classes for syncing data.

Method of the class: ReportsSync{}

Return

Array.

Usage

$result = ReportsSync::get_schedulers();

ReportsSync::get_schedulers() code WC 7.1.0

public static function get_schedulers() {
	$schedulers = apply_filters(
		'woocommerce_analytics_report_schedulers',
		array(
			new CustomersScheduler(),
			new OrdersScheduler(),
		)
	);

	foreach ( $schedulers as $scheduler ) {
		if ( ! is_subclass_of( $scheduler, 'Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler' ) ) {
			throw new \Exception( __( 'Report sync schedulers should be derived from the Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler class.', 'woocommerce' ) );
		}
	}

	return $schedulers;
}