Automattic\WooCommerce\Internal\Admin\Notes

EmailNotification::get_template_filename()publicWC 1.0

Return template filename.

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

Хуков нет.

Возвращает

Строку.

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

$EmailNotification = new EmailNotification();
$EmailNotification->get_template_filename( $type );
$type(строка)
Type of email to send.
По умолчанию: 'html'

Код EmailNotification::get_template_filename() WC 8.7.0

public function get_template_filename( $type = 'html' ) {
	if ( ! in_array( $type, array( 'html', 'plain' ), true ) ) {
		return;
	}
	$content_data      = $this->note->get_content_data();
	$template_filename = "{$type}-merchant-notification.php";
	if ( isset( $content_data->{"template_{$type}"} ) && file_exists( $this->template_base . $content_data->{ "template_{$type}" } ) ) {
		$template_filename = $content_data[ "template_{$type}" ];
	}
	return $template_filename;
}