WC_Email::get_block_email_html_contentprivateWC 1.0

Gerenerates the HTML content for the email from a block based email. and if so, it renders the block email content.

Method of the class: WC_Email{}

No Hooks.

Returns

String|null.

Usage

// private - for code of main (parent) class only
$result = $this->get_block_email_html_content(): ?string;

WC_Email::get_block_email_html_content() code WC 10.8.1

private function get_block_email_html_content(): ?string {
	if ( ! $this->block_email_editor_enabled ) {
		return null;
	}

	/** Service for rendering emails from block content @var BlockEmailRenderer $renderer */
	$renderer = wc_get_container()->get( BlockEmailRenderer::class );
	return $renderer->maybe_render_block_email( $this );
}