Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCTransactionalEmailPostsGenerator::resolve_block_template_path │ public static │ WC 10.8.0

Resolve the absolute path of the block template for the given email.

Uses {@see self::resolve_block_template_name()} for name resolution and then delegates to wc_locate_template() theme overrides are honored.

Метод класса: WCTransactionalEmailPostsGenerator{}

Хуков нет.

Возвращает

string. The absolute template path, or an empty string if none can be resolved.

Использование

$result = WCTransactionalEmailPostsGenerator::resolve_block_template_path( $email ): string;
$email(WC_Email) (обязательный)
The email object.

Список изменений

С версии 10.8.0 Введена.

Код WCTransactionalEmailPostsGenerator::resolve_block_template_path() WC 11.2.2

public static function resolve_block_template_path( $email ): string {
	$template_name = self::resolve_block_template_name( $email );
	if ( '' === $template_name ) {
		return '';
	}

	return (string) wc_locate_template(
		$template_name,
		'',
		(string) $email->template_base
	);
}