Automattic\WooCommerce\Internal\Email

EmailStyleSync::registerpublicWC 1.0

Register hooks and filters.

Метод класса: EmailStyleSync{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$EmailStyleSync = new EmailStyleSync();
$EmailStyleSync->register();

Код EmailStyleSync::register() WC 9.9.4

public function register() {
	// Hook into theme change events.
	add_action( 'after_switch_theme', array( $this, 'sync_email_styles_with_theme' ) );
	add_action( 'customize_save_after', array( $this, 'sync_email_styles_with_theme' ) );

	// Hook into theme.json and global styles changes.
	add_action( 'wp_theme_json_data_updated', array( $this, 'sync_email_styles_with_theme' ) );
	add_action( 'rest_after_insert_global_styles', array( $this, 'sync_email_styles_with_theme' ) );
	add_action( 'update_option_wp_global_styles', array( $this, 'sync_email_styles_with_theme' ) );
	add_action( 'save_post_wp_global_styles', array( $this, 'sync_email_styles_with_theme' ) );

	// Hook into the theme editor save action.
	add_action( 'wp_ajax_wp_save_styles', array( $this, 'sync_email_styles_with_theme' ), 999 );

	// Hook into auto-sync option update to trigger sync when enabled.
	add_action( 'update_option_' . self::AUTO_SYNC_OPTION, array( $this, 'maybe_sync_on_option_update' ), 10, 3 );
}