PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.56
Timetics – Appointment Booking Calendar & Scheduling v1.0.56
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.56, at templates/emails/new-event-customer.php

174 lines 11.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 $timetics_staff_name = $this->staff->get_display_name();
5 $timetics_staff_email = $this->staff->get_email();
6 $timetics_customer_name = $this->customer->get_display_name();
7 $timetics_customer_email = $this->customer->get_email();
8 $timetics_title = $this->get_title();
9 $timetics_description = $this->meeting->get_description();
10 $timetics_location = $this->booking->get_location();
11 $timetics_location_type = $this->booking->get_location_type();
12
13 $timetics_event = $this->booking->get_event();
14 $timetics_join_link = 'google-meet' === $timetics_location_type && ! empty( $timetics_event['hangoutLink'] ) ? $timetics_event['hangoutLink'] : '';
15
16 $timetics_timezone = $this->booking->get_timezone();
17 $timetics_staff_timezone = $this->meeting->get_timezone();
18
19 $timetics_dt = timetics_convert_timezone( $this->booking->get_start_date() . ' ' . $this->booking->get_start_time(), $timetics_timezone, $timetics_staff_timezone );
20
21 // Use WordPress date and time format settings
22 $timetics_formatted = timetics_format_email_datetime( $this->booking->get_start_date(), $this->booking->get_start_time() );
23 $timetics_day = $timetics_formatted['day'];
24 $timetics_time = $timetics_formatted['time'];
25 $timetics_date = $timetics_formatted['date'];
26
27 $timetics_email_body = timetics_get_option( 'booking_created_customer_email_body' );
28 $timetics_email_title = timetics_get_option( 'booking_created_customer_email_title' );
29 $timetics_email_title = ! empty( $timetics_email_title ) ? $timetics_email_title : $this->get_title();
30
31 $timetics_meeting_id = $this->meeting->get_id();
32 $timetics_booking_cancel_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&meeting_id=' . $this->meeting->get_id() .'&booking_action=cancel'. '&appointment_token=' . $this->booking->get_security_token();
33 $timetics_booking_reschedule_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&meeting_id=' . $this->meeting->get_id() . '&booking_action=reschedule'. '&appointment_token='. $this->booking->get_security_token();
34
35
36 $timetics_placeholders = [
37 '{%meeting_title%}' => $this->meeting->get_name(),
38 '{%meeting_date%}' => $timetics_date,
39 '{%meeting_time%}' => $timetics_time,
40 '{%meeting_location%}' => $timetics_location,
41 '{%meeting_duration%}' => $this->meeting->get_duration(),
42 '{%host_name%}' => $timetics_staff_name,
43 '{%host_email%}' => $this->staff->get_email(),
44 '{%customer_name%}' => $timetics_customer_name,
45 '{%customer_email%}' => $timetics_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 wp_kses( timetics_replace_placeholder( $timetics_email_title, $timetics_placeholders ), 'post' ); ?>
56 </h3>
57 </div>
58 <?php if ( $timetics_email_body ): ?>
59
60 <?php echo wp_kses( timetics_replace_placeholder( $timetics_email_body, $timetics_placeholders ), 'post' ); ?>
61 <?php if ( 'google-meet' === $timetics_location_type && $timetics_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( $timetics_join_link ); ?>"><?php echo esc_url( $timetics_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( $timetics_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
91 /* translators: %s: Customer name */
92 printf( esc_html__( 'Hi %s,', 'timetics' ), esc_html( $timetics_customer_name ) );?>
93 </p>
94
95 <p style="color: #556880; margin-bottom: 5px"><?php esc_attr_e( 'A new meeting has been scheduled', 'timetics' );?></p>
96
97 <div class="data-wrapper" style="border: 1px solid #E2ECF4; border-radius: 12px; padding: 30px; margin: 24px 0;">
98 <div class="single-data-entry" style="margin: 0 0 20px;">
99 <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>
100 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
101 <?php echo esc_html( timetics_replace_placeholder( $timetics_email_title, $timetics_placeholders ) ); ?>
102 </p>
103
104 </div>
105 <div class="single-data-entry" style="margin: 0 0 20px;">
106 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Organized By:', 'timetics' ); ?></p>
107 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
108 <?php echo esc_html( $timetics_staff_name );?> -
109 <a style="color: #3161F1" href="mailto:<?php echo esc_attr( $timetics_staff_email )?>"><?php echo esc_html( $timetics_staff_email ); ?></a>
110 </p>
111 </div>
112
113 <div class="single-data-entry" style="margin: 10px 0 20px;">
114 <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>
115 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php
116 /* translators: 1: Time, 2: Day, 3: Date, 4: Timezone */
117 printf( esc_html__( '%1$s, %2$s %3$s (%4$s)', 'timetics' ), esc_html( $timetics_time ), esc_html( $timetics_day ), esc_html( $timetics_date ), esc_html( $timetics_timezone ) );?></p>
118 </div>
119
120 <?php if ( 'google-meet' === $timetics_location_type && $timetics_join_link ): ?>
121 <div class="single-data-entry" style="margin: 10px 0 20px;">
122 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
123 <?php esc_html_e( 'Location:', 'timetics' );?>
124 </p>
125 <img width="110" style="margin: 5px 0;" src="<?php echo esc_url( TIMETICS_PLUGIN_URL . 'assets/images/social-icons/google-meet.svg' ); ?>" alt="Google Meet">
126 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
127 <?php echo esc_html__('Joining link:', 'timetics') ;?>
128 <a style="color: #3161F1" href="<?php echo esc_url( $timetics_join_link ); ?>"><?php echo esc_url( $timetics_join_link ); ?></a>
129 </p>
130 </div>
131 <?php else : ?>
132 <div class="single-data-entry" style="margin: 10px 0 20px;">
133 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
134 <?php esc_html_e( 'Location:', 'timetics' );?>
135 </p>
136 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
137 <?php echo esc_html($timetics_location) ;?>
138 </p>
139 </div>
140 <?php endif;?>
141
142 <?php do_action( 'timetics_new_event_email', $this->booking, 'customer' ); ?>
143 <?php if($timetics_timezone) :?>
144 <div class="single-data-entry" style="margin: 10px 0 20px;">
145 <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>
146 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html( $timetics_timezone ); ?></p>
147 </div>
148 <?php endif;?>
149
150 <?php do_action( 'timetics_new_seats', $this->booking, 'customer' ); ?>
151
152 </div>
153 <?php endif;?>
154
155 <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>
156 <table cellspacing="0" cellpadding="0" border="0" style="margin: 35px 0 40px;">
157 <tr>
158 <td style="padding-right: 10px;">
159 <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( $timetics_booking_reschedule_url ); ?>">
160 <?php echo esc_html__( 'Reschedule', 'timetics' ); ?>
161 </a>
162 </td>
163 <td>
164 <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( $timetics_booking_cancel_url ); ?>">
165 <?php echo esc_html__( 'Cancel', 'timetics' ); ?>
166 </a>
167 </td>
168 </tr>
169 </table>
170 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html__('Thank you!', 'timetics'); ?></p>
171 </div>
172 <?php do_action('timetics_email_footer', $timetics_customer_email) ;?>
173 </div>
174 </div>