Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer

Rendering_Context::get_theme_stylespublicWC 1.0

Get the email theme styles.

Method of the class: Rendering_Context{}

No Hooks.

Returns

Array{ . spacing: array{

blockGap: string,
padding: array{bottom: string, left: string, right: string, top: string}

}, color: array{

background: string,
text: string

}, typography: array{

fontFamily: string

} }

Usage

$Rendering_Context = new Rendering_Context();
$Rendering_Context->get_theme_styles(): array;

Rendering_Context::get_theme_styles() code WC 10.8.1

public function get_theme_styles(): array {
	$theme = $this->get_theme_json();
	return $theme->get_data()['styles'] ?? array();
}