Automattic\WooCommerce\EmailEditor\Engine

Site_Style_Sync_Controller::initializepublicWC 1.0

Initialize the sync controller

Hook into theme changes to trigger automatic sync

Method of the class: Site_Style_Sync_Controller{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Site_Style_Sync_Controller = new Site_Style_Sync_Controller();
$Site_Style_Sync_Controller->initialize(): void;

Site_Style_Sync_Controller::initialize() code WC 10.5.0

public function initialize(): void {
	add_action( 'switch_theme', array( $this, 'invalidate_site_theme_cache' ) );
	add_action( 'customize_save_after', array( $this, 'invalidate_site_theme_cache' ) );
}