• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

HELP (adding some text and images)

khenji

New member
May 11, 2022
20
5
3
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
 
To add images and text you only need to copy a few lines of $content, and fill it with the image url and text you want

Ex :

$content = __("Dear Reservation Team", "gdlr-hotel") . " \n\n";

The \n function to add a line is the same as the enter key function
 
  • Like
Reactions: khenji
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock