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

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

133 lines 8.3 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 $customer_name = $this->customer->get_display_name();
4 $customer_email = $this->customer->get_email();
5 $title = $this->get_title();
6 $description = $this->meeting->get_description();
7 $location = $this->booking->get_location();
8 $location_type = $this->booking->get_location_type();
9
10 $event = $this->booking->get_event();
11 $join_link = 'google-meet' === $location_type && ! empty( $event['hangoutLink'] ) ? $event['hangoutLink'] : '';
12 $timezone = $this->booking->get_timezone();
13 $staff_timezone = $this->meeting->get_timezone();
14
15 $dt = timetics_convert_timezone( $this->booking->get_start_date() . ' ' . $this->booking->get_start_time(), $timezone, $staff_timezone );
16
17 $day = $dt->format('l');
18 $time = $dt->format('h:i a');
19 $date = $dt->format('d F Y');
20
21 $email_body = timetics_get_option( 'booking_created_host_email_body' );
22 $email_title = timetics_get_option( 'booking_created_host_email_title' );
23 $email_title = ! empty( $email_title ) ? $email_title : $this->get_title();
24
25 $meeting_id = $this->meeting->get_id();
26 $booking_cancel_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&meeting_id=' . $this->meeting->get_id() .'&booking_action=cancel';
27 $booking_reschedule_url = $this->meeting->get_appointment_permalink() . '?id=' . $this->booking->get_id() . '&meeting_id=' . $this->meeting->get_id() . '&booking_action=reschedule';
28
29
30 $placeholders = [
31 '{%meeting_title%}' => $this->meeting->name,
32 '{%meeting_date%}' => $date,
33 '{%meeting_time%}' => $time,
34 '{%meeting_location%}' => $location,
35 '{%meeting_duration%}' => $this->meeting->duration,
36 '{%host_name%}' => $staff_name,
37 '{%host_email%}' => $this->staff->get_email(),
38 '{%customer_name%}' => $customer_name,
39 '{%customer_email%}' => $customer_email,
40 ];
41 ?>
42
43 <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;">
44 <div style="max-width: 600px; margin: 0 auto;">
45 <div class="email-content" style="padding: 40px; background-color: #ffffff; border-radius: 0 0 12px 12px; border-top: 4px solid #3161F1; margin-bottom: 40px;">
46 <?php do_action('timetics_email_header') ;?>
47 <div class="email-title">
48 <h3 style="color: #3161F1; font-size: 24px; font-weight: 600; margin: 30px 0;">
49 <?php echo esc_html( timetics_replace_placeholder( $email_title, $placeholders ) ); ?>
50 </h3>
51 </div>
52
53 <?php if ( $email_body ): ?>
54
55 <?php echo timetics_replace_placeholder( $email_body, $placeholders ); ?>
56 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
57 <div class="single-data-entry" style="margin: 10px 0 20px;">
58 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
59 <?php esc_html_e( 'Location:', 'timetics' );?>
60 </p>
61 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
62 <?php echo esc_html__('Joining link:', 'timetics') ;?>
63 <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
64 </p>
65 </div>
66 <?php else : ?>
67 <div class="single-data-entry" style="margin: 10px 0 20px;">
68 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
69 <?php esc_html_e( 'Location:', 'timetics' );?>
70 </p>
71 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
72 <?php echo esc_html($location) ;?>
73 </p>
74 </div>
75 <?php endif; ?>
76 <?php do_action( 'timetics_new_event_email', $this->booking, 'staff' ); ?>
77
78 <?php else: ?>
79 <p class="greeting" style="color: #556880; margin-bottom: 5px">
80 <?php printf( esc_html__( 'Hi %s,', 'timetics' ), esc_html( $staff_name ) );?>
81 </p>
82
83 <p style="color: #556880; margin-bottom: 5px"><?php esc_attr_e( 'A new meeting has been scheduled', 'timetics' );?></p>
84
85 <div class="data-wrapper" style="border: 1px solid #E2ECF4; border-radius: 12px; padding: 30px; margin: 24px 0;">
86 <div class="single-data-entry" style="margin: 0 0 20px;">
87 <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>
88 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
89 <?php echo esc_html( timetics_replace_placeholder( $email_title, $placeholders ) ); ?>
90 </p>
91
92 </div>
93 <div class="single-data-entry" style="margin: 0 0 20px;">
94 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Invitee:', 'timetics' ); ?></p>
95 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
96 <?php echo esc_html( $customer_name );?> -
97 <a style="color: #3161F1" href="mailto:<?php echo esc_attr( $customer_email )?>"><?php echo esc_html( $customer_email ); ?></a>
98 </p>
99 </div>
100
101 <div class="single-data-entry" style="margin: 10px 0 20px;">
102 <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>
103 <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( $staff_timezone ) );?></p>
104 </div>
105
106 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
107 <div class="single-data-entry" style="margin: 10px 0 20px;">
108 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
109 <?php esc_html_e( 'Location:', 'timetics' );?>
110 </p>
111 <img width="110" style="margin: 5px 0;" src="https://arraytics.dev/social-icons/google-meet.png" alt="Google Meet">
112 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
113 <?php echo esc_html__('Joining link:', 'timetics') ;?>
114 <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
115 </p>
116 </div>
117 <?php endif;?>
118
119 <?php do_action( 'timetics_new_event_email', $this->booking, 'staff' ); ?>
120 <?php if($timezone) :?>
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;"><?php echo esc_html__( 'Invitee Time Zone:', 'timetics' ); ?></p>
123 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html( $timezone ); ?></p>
124 </div>
125 <?php endif;?>
126 </div>
127 <?php endif;?>
128
129 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html__('Thank you!', 'timetics'); ?></p>
130 </div>
131 <?php do_action('timetics_email_footer', $customer_email) ;?>
132 </div>
133 </div>