Automattic\WooCommerce\Admin

ReportsSync::init()public staticWC 1.0

Hook in sync methods.

{} It's a method of the class: ReportsSync{}

No Hooks.

Return

null. Nothing.

Usage

$result = ReportsSync::init();

Code of ReportsSync::init() WC 7.1.0

public static function init() {
	// Initialize scheduler hooks.
	foreach ( self::get_schedulers() as $scheduler ) {
		$scheduler::init();
	}
	add_action( 'woocommerce_update_product', array( __CLASS__, 'clear_stock_count_cache' ) );
	add_action( 'woocommerce_new_product', array( __CLASS__, 'clear_stock_count_cache' ) );
	add_action( 'update_option_woocommerce_notify_low_stock_amount', array( __CLASS__, 'clear_stock_count_cache' ) );
	add_action( 'update_option_woocommerce_notify_no_stock_amount', array( __CLASS__, 'clear_stock_count_cache' ) );
}