Automattic\WooCommerce\Internal\Admin\Notes

EmailNotification::get_template_filename()publicWC 1.0

Return template filename.

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

No Hooks.

Return

String.

Usage

$EmailNotification = new EmailNotification();
$EmailNotification->get_template_filename( $type );
$type(string)
Type of email to send.
Default: 'html'

Code of EmailNotification::get_template_filename() WC 7.1.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;
}