woocommerce_email_styles filter-hookWC 2.3.0

Provides an opportunity to filter the CSS styles included in e-mails.

Usage

add_filter( 'woocommerce_email_styles', 'wp_kama_woocommerce_email_styles_filter', 10, 2 );

/**
 * Function for `woocommerce_email_styles` filter-hook.
 * 
 * @param string    $css   CSS code.
 * @param \WC_Email $email E-mail instance.
 *
 * @return string
 */
function wp_kama_woocommerce_email_styles_filter( $css, $email ){

	// filter...
	return $css;
}
$css(string)
CSS code.
$email(\WC_Email)
E-mail instance.

Changelog

Since 2.3.0 Introduced.

Where the hook is called

WC_Email::style_inline()
woocommerce_email_styles
woocommerce/includes/emails/class-wc-email.php 746
$css = apply_filters( 'woocommerce_email_styles', $css, $this );

Where the hook is used in WooCommerce

Usage not found.