Automattic\WooCommerce\EmailEditor\Engine

Site_Style_Sync_Controller::convert_color_stylesprivateWC 1.0

Convert site color styles to email format

Method of the class: Site_Style_Sync_Controller{}

No Hooks.

Returns

Array. Email-compatible color styles.

Usage

// private - for code of main (parent) class only
$result = $this->convert_color_styles( $color_styles ): array;
$color_styles(array) (required)
Site color styles.

Site_Style_Sync_Controller::convert_color_styles() code WC 10.5.0

private function convert_color_styles( array $color_styles ): array {
	$email_colors = array();

	$this->resolve_and_assign( $color_styles, 'background', $email_colors );
	$this->resolve_and_assign( $color_styles, 'text', $email_colors );

	return $email_colors;
}