Automattic\WooCommerce\Internal\Admin\Schedulers

OrdersScheduler::init()public staticWC 1.0

Attach order lookup update hooks.

Method of the class: OrdersScheduler{}

No Hooks.

Return

null. Nothing.

Usage

$result = OrdersScheduler::init();

OrdersScheduler::init() code WC 7.3.0

public static function init() {
	// Activate WC_Order extension.
	\Automattic\WooCommerce\Admin\Overrides\Order::add_filters();
	\Automattic\WooCommerce\Admin\Overrides\OrderRefund::add_filters();

	// Order and refund data must be run on these hooks to ensure meta data is set.
	add_action( 'woocommerce_update_order', array( __CLASS__, 'possibly_schedule_import' ) );
	add_action( 'woocommerce_create_order', array( __CLASS__, 'possibly_schedule_import' ) );
	add_action( 'woocommerce_refund_created', array( __CLASS__, 'possibly_schedule_import' ) );

	OrdersStatsDataStore::init();
	CouponsDataStore::init();
	ProductsDataStore::init();
	TaxesDataStore::init();

	parent::init();
}