Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer
Rendering_Context::get
Get a specific value from the email context.
This method allows extensions to access custom context data that may be specific to their implementation (e.g., order IDs, email types, etc.).
Method of the class: Rendering_Context{}
No Hooks.
Returns
Mixed. The context value or default.
Usage
$Rendering_Context = new Rendering_Context(); $Rendering_Context->get( $key, $default_value );
- $key(string) (required)
- The context key.
- $default_value(mixed)
- Default value if key is not found.
Default:null
Rendering_Context::get() Rendering Context::get code WC 10.4.3
public function get( string $key, $default_value = null ) {
return $this->email_context[ $key ] ?? $default_value;
}