Automattic\WooCommerce\Internal\Admin\Notes
EmailNotification::get_template_filename()
Return template filename.
Method of the class: EmailNotification{}
No Hooks.
Return
String
.
Usage
$EmailNotification = new EmailNotification(); $EmailNotification->get_template_filename( $type );
- $type(string)
- Type of email to send.
Default: 'html'
EmailNotification::get_template_filename() EmailNotification::get template filename code WC 9.6.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; }