PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.13
Timetics – Appointment Booking Calendar & Scheduling v1.0.13
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
timetics / templates / emails / new-event-customer.php

new-event-customer.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.13, at templates/emails/new-event-customer.php

166 lines 10.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $staff_name = $this->staff->get_display_name();
3 $staff_email = $this->staff->get_email();
4 $customer_name = $this->customer->get_display_name();
5 $customer_email = $this->customer->get_email();
6 $title = $this->get_title();
7 $description = $this->meeting->get_description();
8 $location = $this->booking->get_location();
9 $location_type = $this->booking->get_location_type();
10
11 $event = $this->booking->get_event();
12 $join_link = 'google-meet' === $location_type && ! empty( $event['hangoutLink'] ) ? $event['hangoutLink'] : '';
13
14 $timezone = $this->booking->get_timezone();
15 $staff_timezone = $this->meeting->get_timezone();
16
17 $dt = timetics_convert_timezone( $this->booking->get_start_date() . ' ' . $this->booking->get_start_time(), $timezone, $staff_timezone );
18
19 $day = $dt->format('l');
20 $time = $dt->format('h:i a');
21 $date = $dt->format('d F Y');
22
23 $day = gmdate( 'l', strtotime( $this->booking->get_start_date() ) );
24 $time = gmdate( 'h:i a', strtotime( $this->booking->get_start_time() ) );
25 $date = gmdate( 'd F Y', strtotime( $this->booking->get_start_date() ) );
26
27 $email_body = timetics_get_option( 'booking_created_customer_email_body' );
28 $email_title = timetics_get_option( 'booking_created_customer_email_title' );
29 $email_title = ! empty( $email_title ) ? $email_title : $this->get_title();
30
31 $booking_cancel_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&booking_action=cancel';
32 $booking_reschedule_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&booking_action=reschedule';
33
34 $placeholders = [
35 '{%meeting_title%}' => $this->meeting->name,
36 '{%meeting_date%}' => $date,
37 '{%meeting_time%}' => $time,
38 '{%meeting_location%}' => $location,
39 '{%meeting_duration%}' => $this->meeting->duration,
40 '{%host_name%}' => $staff_name,
41 '{%host_email%}' => $this->staff->get_email(),
42 '{%customer_name%}' => $customer_name,
43 '{%customer_email%}' => $customer_email,
44 ];
45 ?>
46
47 <div class="email-wrapper" style="margin-bottom: 30px; background-color: #f4f5f7; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI','Noto Sans',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji', sans-serif;">
48 <div style="max-width: 600px; margin: 0 auto;">
49 <div class="email-content" style="padding: 40px; background-color: #ffffff; border-radius: 0 0 12px 12px; border-top: 4px solid #3161F1; margin-bottom: 40px;">
50 <?php do_action('timetics_email_header') ;?>
51 <div class="email-title">
52 <h3 style="color: #3161F1; font-size: 24px; font-weight: 600; margin: 30px 0;">
53 <?php echo timetics_replace_placeholder( $email_title, $placeholders ); ?>
54 </h3>
55 </div>
56 <?php if ( $email_body ): ?>
57
58 <?php echo timetics_replace_placeholder( $email_body, $placeholders ); ?>
59 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
60
61 <div class="single-data-entry" style="margin: 10px 0 20px;">
62 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
63 <?php esc_html_e( 'Location:', 'timetics' );?>
64 </p>
65 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
66 <?php echo esc_html__('Joining link:', 'timetics') ;?>
67 <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
68 </p>
69 </div>
70
71 <?php else : ?>
72
73 <div class="single-data-entry" style="margin: 10px 0 20px;">
74 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
75 <?php esc_html_e( 'Location:', 'timetics' );?>
76 </p>
77 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
78 <?php echo esc_html( $location ) ;?>
79 </p>
80 </div>
81
82 <?php endif;?>
83
84 <?php do_action( 'timetics_new_event_email', $this->booking, 'customer' ); ?>
85
86 <?php else: ?>
87 <p class="greeting" style="color: #556880; margin-bottom: 5px">
88 <?php printf( esc_html__( 'Hi %s,', 'timetics' ), esc_html( $customer_name ) );?>
89 </p>
90
91 <p style="color: #556880; margin-bottom: 5px"><?php esc_attr_e( 'A new meeting has been scheduled', 'timetics' );?></p>
92
93 <div class="data-wrapper" style="border: 1px solid #E2ECF4; border-radius: 12px; padding: 30px; margin: 24px 0;">
94 <div class="single-data-entry" style="margin: 0 0 20px;">
95 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Meeting Name:', 'timetics' ); ?></p>
96 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
97 <?php echo esc_html( timetics_replace_placeholder( $email_title, $placeholders ) ); ?>
98 </p>
99
100 </div>
101 <div class="single-data-entry" style="margin: 0 0 20px;">
102 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Host:', 'timetics' ); ?></p>
103 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
104 <?php echo esc_html( $staff_name );?> -
105 <a style="color: #3161F1" href="mailto:<?php echo esc_attr( $staff_email )?>"><?php echo esc_html( $staff_email ); ?></a>
106 </p>
107 </div>
108
109 <div class="single-data-entry" style="margin: 10px 0 20px;">
110 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Date and time:', 'timetics' ); ?></p>
111 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php printf( esc_html__( '%s, %s %s (%s)', 'timetics' ), esc_html( $time ), esc_html( $day ), esc_html( $date ), esc_html( $timezone ) );?></p>
112 </div>
113
114 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
115 <div class="single-data-entry" style="margin: 10px 0 20px;">
116 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
117 <?php esc_html_e( 'Location:', 'timetics' );?>
118 </p>
119 <img width="110" style="margin: 5px 0;" src="https://arraytics.dev/social-icons/google-meet.png" alt="Google Meet">
120 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
121 <?php echo esc_html__('Joining link:', 'timetics') ;?>
122 <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
123 </p>
124 </div>
125 <?php else : ?>
126 <div class="single-data-entry" style="margin: 10px 0 20px;">
127 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
128 <?php esc_html_e( 'Location:', 'timetics' );?>
129 </p>
130 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
131 <?php echo esc_html($location) ;?>
132 </p>
133 </div>
134 <?php endif;?>
135
136 <?php do_action( 'timetics_new_event_email', $this->booking, 'customer' ); ?>
137 <?php if($timezone) :?>
138 <div class="single-data-entry" style="margin: 10px 0 20px;">
139 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Invitee Time Zone:', 'timetics' ); ?></p>
140 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html( $timezone ); ?></p>
141 </div>
142 <?php endif;?>
143 </div>
144 <?php endif;?>
145
146 <p style="color: #556880; margin-bottom: 0; font-size: 15px; font-weight: 600; line-height: 1;"><?php echo esc_html__( 'Need to make changes to this meeting?', 'timetics' ); ?></p>
147 <table cellspacing="0" cellpadding="0" border="0" style="margin: 35px 0 40px;">
148 <tr>
149 <td style="padding-right: 10px;">
150 <a style="padding: 9px 11px 10px 11px; border-radius: 5px; font-weight: 600; font-size: 13px; border: 1px solid #D8DCE2; text-decoration: none; color: #3161F1; text-align: center; white-space: nowrap;" href="<?php echo esc_url( $booking_reschedule_url ); ?>">
151 <?php echo esc_html__( 'Reschedule', 'timetics' ); ?>
152 </a>
153 </td>
154 <td>
155 <a style="padding: 9px 11px 10px 11px; border-radius: 5px; font-weight: 600; font-size: 13px; border: 1px solid #D8DCE2; text-decoration: none; color: #3161F1; text-align: center; white-space: nowrap;" href="<?php echo esc_url( $booking_cancel_url ); ?>">
156 <?php echo esc_html__( 'Cancel', 'timetics' ); ?>
157 </a>
158 </td>
159 </tr>
160 </table>
161 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html__('Thank you!', 'timetics'); ?></p>
162 </div>
163 <?php do_action('timetics_email_footer', $customer_email) ;?>
164 </div>
165 </div>
166