Automattic\WooCommerce\Internal\EmailEditor\EmailTemplates

WooEmailTemplate::get_site_logo_or_titleprivateWC 1.0

Get the site logo or title.

This is used to display the site logo or title in the email template.

Method of the class: WooEmailTemplate{}

No Hooks.

Returns

String. HTML content for the site logo or title.

Usage

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

WooEmailTemplate::get_site_logo_or_title() code WC 10.3.6

private function get_site_logo_or_title(): string {
	$custom_logo = get_custom_logo();

	if ( ! empty( $custom_logo ) ) {
		// Use Site logo if available.
		return '<!-- wp:site-logo {"width":130, "isLink":false} /-->';
	}

	return '<!-- wp:site-title {"level":2} /-->';
}