WooCommerce Code Reference

Rendering_Context
in package

Class Rendering_Context

Table of Contents

$theme_json  : WP_Theme_JSON
Instance of the WP Theme.
__construct()  : mixed
Rendering_Context constructor.
get_layout_width_without_padding()  : string
Returns the width of the layout without padding.
get_theme_json()  : WP_Theme_JSON
Returns WP_Theme_JSON instance that should be used during the email rendering.
get_theme_settings()  : array<string|int, mixed>
Get settings from the theme.
get_theme_styles()  : 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}}
Get the email theme styles.
translate_slug_to_color()  : string
Translate color slug to color.

Properties

Methods

get_theme_styles()

Get the email theme styles.

public get_theme_styles() : 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}}
Return values
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}}