woocommerce_email_editor_site_theme filter-hookWC 2.3.0

Filter the site theme data used for email style sync.

This filter allows overriding the site theme used when syncing global styles for the email editor. Useful for environments where theme data is not directly accessible (e.g., wp.com Atomic and Jetpack sites).

Usage

add_filter( 'woocommerce_email_editor_site_theme', 'wp_kama_woocommerce_email_editor_site_theme_filter' );

/**
 * Function for `woocommerce_email_editor_site_theme` filter-hook.
 * 
 * @param WP_Theme_JSON $site_theme The site theme data.
 *
 * @return WP_Theme_JSON
 */
function wp_kama_woocommerce_email_editor_site_theme_filter( $site_theme ){

	// filter...
	return $site_theme;
}
$site_theme(WP_Theme_JSON)
The site theme data.

Changelog

Since 2.3.0 Introduced.

Where the hook is called

Site_Style_Sync_Controller::get_site_theme()
woocommerce_email_editor_site_theme
woocommerce/packages/email-editor/src/Engine/class-site-style-sync-controller.php 162
$this->site_theme = apply_filters( 'woocommerce_email_editor_site_theme', $this->site_theme );

Where the hook is used in WooCommerce

Usage not found.