Automattic\WooCommerce\Internal\Email
EmailStyleSync::sync_email_styles_with_theme
Sync email styles with theme styles if auto-sync is enabled.
Uses a flag to prevent recursive calls.
Method of the class: EmailStyleSync{}
No Hooks.
Returns
null
. Nothing (null).
Usage
$EmailStyleSync = new EmailStyleSync(); $EmailStyleSync->sync_email_styles_with_theme();
EmailStyleSync::sync_email_styles_with_theme() EmailStyleSync::sync email styles with theme code WC 9.9.3
public function sync_email_styles_with_theme() { if ( $this->is_syncing || ! $this->is_auto_sync_enabled() || ! wp_theme_has_theme_json() ) { return; } $this->is_syncing = true; try { $this->update_email_colors(); } finally { $this->is_syncing = false; } }