get_template(); if ( file_exists( $template ) ) { include $template; } } /** * Add email footer * * @return void */ public function add_email_footer() { include TIMETICS_PLUGIN_DIR . '/templates/emails/email-footer.php'; } /** * Get email content * * @return string */ public function get_template_content() { ob_start(); include TIMETICS_PLUGIN_DIR . '/templates/emails/email-body.php'; return ob_get_clean(); } /** * Send email using email template * * @return bool */ public function send() { $headers = $this->get_headers(); $subject = $this->get_subject(); $to = $this->get_recipient(); $message = $this->get_template_content(); return wp_mail($to, $subject, $message, $headers); } }