khenji
New member
- May 11, 2022
- 8
- 0
- 1
Code:
// send the mail
if( !function_exists('gdlr_hotel_mail') ){
function gdlr_hotel_mail($recipient, $title, $message, $reply_to = ''){
global $hotel_option;
$headers = 'From: ' . $hotel_option['recipient-name'] . ' <' . $hotel_option['recipient-mail'] . '>' . "\r\n";
if( !empty($reply_to) ){
$headers = $headers . 'Reply-To: ' . $reply_to . ' <' . $reply_to . '>' . "\r\n";
}
$headers = $headers . 'Content-Type: text/plain; charset=UTF-8 ' . " \r\n";
wp_mail($recipient, $title, $message, $headers);
}
}
if( !function_exists('gdlr_hotel_mail_content') ){
function gdlr_hotel_mail_content($contact, $data, $payment_info, $price){
$content = __("Contact Info", "gdlr-hotel") . " \n";
$content .= __("Name :", "gdlr-hotel") . " {$contact['first_name']}\n";
$content .= __("Last Name :", "gdlr-hotel") . " {$contact['last_name']}\n";
$content .= __("Phone :", "gdlr-hotel") . " {$contact['phone']}\n";
$content .= __("Email :", "gdlr-hotel") . " {$contact['email']}\n";
$content .= __("Address :", "gdlr-hotel") . " {$contact['address']}\n";
$content .= __("Additional Note :", "gdlr-hotel") . " {$contact['additional-note']}\n";
$content .= __("Coupon :", "gdlr-hotel") . " {$contact['coupon']}\n";
if( !empty($data['gdlr-hotel-branches']) ){
$term = get_term_by('id', $data['gdlr-hotel-branches'], 'room_category');
$content .= "Branches : {$term->name}\n";
$category_meta = get_option('gdlr_hotel_branch', array());
if( !empty($category_meta[$term->slug]['content']) ){
$content .= "Location : {$category_meta[$term->slug]['content']}\n";
}
}
$content .= "\n";
this is the preview : https://snipboard.io/TmAxdy.jpg
i want to change it to: https://snipboard.io/6iHVcX.jpg
thanks in advance