BOOKING CONFIRMATION - TO TOUR MAIL

Pending
CityTours - Hotel & Tour Booking WordPress Theme CityTours - Hotel & Tour Booking WordPress Theme November 01, 2019
Login to reply
jenni kim
11 months ago

Your writing is really great. wyo meaning  I’m so glad I read it. It kept me hooked the whole way through.

Harrison Rhodes
11 months ago

Everything is very open with a clear description of the issues. It was truly informative. Your website is very helpful. Many thanks for sharing!


MyMorri Login

Kelly R Support Agent
4 years ago

I did not understand your requirement correctly.

And you found the right position.

Please find following code.

if ( ! empty( $ct_options['tour_booked_notify_admin'] ) ) {

    $subject = empty( $ct_options['tour_admin_email_subject'] ) ? 'You received a booking' : $ct_options['tour_admin_email_subject'];
    $description = empty( $ct_options['tour_admin_email_description'] ) ? 'Booking Details' : $ct_options['tour_admin_email_description'];

    foreach ( $variables as $variable ) {
     $subject = str_replace( "[" . $variable . "]", $$variable, $subject );
     $description = str_replace( "[" . $variable . "]", $$variable, $description );
    }

    ct_send_mail( $site_name, $admin_email, $admin_email, $subject, $description );
   }

And add following code under it.

$custom_email = "your custom email address here";
ct_send_mail( $site_name, $admin_email, $custom_email , $subject, $description );

Regards, C-Themes

Pedro Pires
4 years ago

Hi Kelly R,

I am sorry but it is not working what I need is to send exactly the same "admin booking notification" with the same format

to the tour email when there is a tour booking. - Please HELP!

- $tour_email = get_post_meta( $order_data['tour_id'], '_tour_email', true );

...

/* mailing function to admin */
            if ( ! empty( $ct_options['tour_booked_notify_admin'] ) ) {
                $subject = empty( $ct_options['tour_admin_email_subject'] ) ? 'You received a booking' : $ct_options['tour_admin_email_subject'];
                $description = empty( $ct_options['tour_admin_email_description'] ) ? 'Booking Details' : $ct_options['tour_admin_email_description'];

                foreach ( $variables as $variable ) {
                    $subject = str_replace( "[" . $variable . "]", $$variable, $subject );
                    $description = str_replace( "[" . $variable . "]", $$variable, $description );
                }

                ct_send_mail( $site_name, $admin_email, $admin_email, $subject, $description );
            }
            return true;
        }
        return false;

Thanks!

Best Regards

Pedro


Kelly R Support Agent
4 years ago

Yes, You can edit ct_send_mail function.

Please add following code in the top of the function.

return true;

Best Regards,

C-Themes

Pedro Pires
4 years ago

HI,

In the theme options, it is only possible to able/disable booking notification mail to wordpress admin and I would like to send booking notification mail to other recipients like in my case tour_mail.

Where I can change the code for that:

/wp-content/plugins/ct-booking/ct-booking.php file maybe???

function ct_send_mail( $from_name, $from_address, $to_address, $subject, $description ) {

        //Create Email Headers

        $headers = "MIME-Version: 1.0" . "\r\n";

        $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

        $headers .= "From: ".$from_name." <".$from_address.">\n";

        $headers .= "Reply-To: ".$from_name." <".$from_address.">\n";

        $message = "\n";

        $message .= "\n";

        $message .= $description;

        $message .= "\n";

        $message .= "\n";

        $mailsent = wp_mail( $to_address, $subject, $message, $headers );

        return ($mailsent)?(true):(false);

    }

Thanks!

Best Regards

Pedro Pires