Commit 32b2d1b1 by nadeem.qasmi

email templates working

parent c08e6714
Pipeline #560 passed with stage
in 0 seconds
......@@ -180,11 +180,18 @@ function vq_lms_process_order()
}
}
$status = "";
$pmsg = "";
$to .= ', '.$user['email'];
$subject = get_option('vq_lms_payment_email_subject');
$body = '';
$body .= $postContent;
$body = get_option('vq_lms_payment_email_template');
$body = str_replace('[[ORDER_DETAILS]]', $itemsXML, $body);
$body = str_replace('[[PRICE]]', $totalCost, $body);
$body = str_replace('[[STATUS]]', $status, $body);
$body = str_replace('[[RESPONSE]]', $pmsg, $body);
//$body .= $postContent;
add_filter('wp_mail_content_type', 'set_html_content_type');
wp_mail($to, $subject, $body);
......
......@@ -49,11 +49,15 @@ if ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['download_submit'] )
if ($catx == 'all') {
$postContent .= '<br><strong>All Courses List: '. $listUrl .' </strong>';
//$postContent .= '<br><strong>All Courses List: ['. $listUrl .'] </strong>';
$list = '<br><strong>All Courses List: ['. $listUrl .'] </strong>';
} else{
$list = '';
}
}
$postContent .= '<strong>Download Courses: [' . implode( ', ', $courseName ) . '] </strong>';
//$postContent .= '<strong>Download Courses: [' . implode( ', ', $courseName ) . '] </strong>';
$courses = '<strong>Download Courses: [' . implode( ', ', $courseName ) . '] </strong>';
$newDownloadRequest = array(
'post_title' => $fname . ' ' . $lname,
......@@ -65,8 +69,13 @@ if ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['download_submit'] )
$to = $_POST['dl_email'];
$to .= ', '.get_option('vq_lms_payment_notify_email');
$subject = get_option('vq_lms_download_email_subject');
$body = '';
$body .= $postContent;
$body = get_option('vq_lms_download_email_template');
$body = str_replace('[[DOWNLOAD_DETAILS]]', $postContent, $body);
$body = str_replace('[[COURSES]]', $courses, $body);
$body = str_replace('[[LIST]]', $list, $body);
//$body .= $postContent;
add_filter('wp_mail_content_type', 'set_html_content_type');
wp_mail($to, $subject, $body);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment