PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.16
Timetics – Appointment Booking Calendar & Scheduling v1.0.16
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 1.0.22 All 64 releases
timetics / templates / emails / new-event-customer.php

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

168 lines 10.4 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 $meeting_id = $this->meeting->get_id();
32 $booking_cancel_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&meeting_id=' . $this->meeting->get_id() .'&booking_action=cancel';
33 $booking_reschedule_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&meeting_id=' . $this->meeting->get_id() . '&booking_action=reschedule';
34
35
36 $placeholders = [
37 '{%meeting_title%}' => $this->meeting->name,
38 '{%meeting_date%}' => $date,
39 '{%meeting_time%}' => $time,
40 '{%meeting_location%}' => $location,
41 '{%meeting_duration%}' => $this->meeting->duration,
42 '{%host_name%}' => $staff_name,
43 '{%host_email%}' => $this->staff->get_email(),
44 '{%customer_name%}' => $customer_name,
45 '{%customer_email%}' => $customer_email,
46 ];
47 ?>
48
49 <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;">
50 <div style="max-width: 600px; margin: 0 auto;">
51 <div class="email-content" style="padding: 40px; background-color: #ffffff; border-radius: 0 0 12px 12px; border-top: 4px solid #3161F1; margin-bottom: 40px;">
52 <?php do_action('timetics_email_header') ;?>
53 <div class="email-title">
54 <h3 style="color: #3161F1; font-size: 24px; font-weight: 600; margin: 30px 0;">
55 <?php echo timetics_replace_placeholder( $email_title, $placeholders ); ?>
56 </h3>
57 </div>
58 <?php if ( $email_body ): ?>
59
60 <?php echo timetics_replace_placeholder( $email_body, $placeholders ); ?>
61 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
62
63 <div class="single-data-entry" style="margin: 10px 0 20px;">
64 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
65 <?php esc_html_e( 'Location:', 'timetics' );?>
66 </p>
67 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
68 <?php echo esc_html__('Joining link:', 'timetics') ;?>
69 <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
70 </p>
71 </div>
72
73 <?php else : ?>
74
75 <div class="single-data-entry" style="margin: 10px 0 20px;">
76 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
77 <?php esc_html_e( 'Location:', 'timetics' );?>
78 </p>
79 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
80 <?php echo esc_html( $location ) ;?>
81 </p>
82 </div>
83
84 <?php endif;?>
85
86 <?php do_action( 'timetics_new_event_email', $this->booking, 'customer' ); ?>
87
88 <?php else: ?>
89 <p class="greeting" style="color: #556880; margin-bottom: 5px">
90 <?php printf( esc_html__( 'Hi %s,', 'timetics' ), esc_html( $customer_name ) );?>
91 </p>
92
93 <p style="color: #556880; margin-bottom: 5px"><?php esc_attr_e( 'A new meeting has been scheduled', 'timetics' );?></p>
94
95 <div class="data-wrapper" style="border: 1px solid #E2ECF4; border-radius: 12px; padding: 30px; margin: 24px 0;">
96 <div class="single-data-entry" style="margin: 0 0 20px;">
97 <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>
98 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
99 <?php echo esc_html( timetics_replace_placeholder( $email_title, $placeholders ) ); ?>
100 </p>
101
102 </div>
103 <div class="single-data-entry" style="margin: 0 0 20px;">
104 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Host:', 'timetics' ); ?></p>
105 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
106 <?php echo esc_html( $staff_name );?> -
107 <a style="color: #3161F1" href="mailto:<?php echo esc_attr( $staff_email )?>"><?php echo esc_html( $staff_email ); ?></a>
108 </p>
109 </div>
110
111 <div class="single-data-entry" style="margin: 10px 0 20px;">
112 <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>
113 <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>
114 </div>
115
116 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
117 <div class="single-data-entry" style="margin: 10px 0 20px;">
118 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
119 <?php esc_html_e( 'Location:', 'timetics' );?>
120 </p>
121 <img width="110" style="margin: 5px 0;" src="https://arraytics.dev/social-icons/google-meet.png" alt="Google Meet">
122 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
123 <?php echo esc_html__('Joining link:', 'timetics') ;?>
124 <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
125 </p>
126 </div>
127 <?php else : ?>
128 <div class="single-data-entry" style="margin: 10px 0 20px;">
129 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
130 <?php esc_html_e( 'Location:', 'timetics' );?>
131 </p>
132 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
133 <?php echo esc_html($location) ;?>
134 </p>
135 </div>
136 <?php endif;?>
137
138 <?php do_action( 'timetics_new_event_email', $this->booking, 'customer' ); ?>
139 <?php if($timezone) :?>
140 <div class="single-data-entry" style="margin: 10px 0 20px;">
141 <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>
142 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html( $timezone ); ?></p>
143 </div>
144 <?php endif;?>
145 </div>
146 <?php endif;?>
147
148 <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>
149 <table cellspacing="0" cellpadding="0" border="0" style="margin: 35px 0 40px;">
150 <tr>
151 <td style="padding-right: 10px;">
152 <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 ); ?>">
153 <?php echo esc_html__( 'Reschedule', 'timetics' ); ?>
154 </a>
155 </td>
156 <td>
157 <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 ); ?>">
158 <?php echo esc_html__( 'Cancel', 'timetics' ); ?>
159 </a>
160 </td>
161 </tr>
162 </table>
163 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html__('Thank you!', 'timetics'); ?></p>
164 </div>
165 <?php do_action('timetics_email_footer', $customer_email) ;?>
166 </div>
167 </div>
168