PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.38
Timetics – Appointment Booking Calendar & Scheduling v1.0.38
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
← All changes | templates/emails/customer-update-event.php +42 -50 1.0.63 → 1.0.38 View file →
@@ -1,41 +1,37 @@
1 1 <?php
2 -defined( 'ABSPATH' ) || exit;
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();
3 10
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();
11 + $event = $this->booking->get_event();
12 + $join_link = 'google-meet' === $location_type && ! empty( $event['hangoutLink'] ) ? $event['hangoutLink'] : '';
13 + $timezone = $event ? $event['start']['timeZone'] : '';
14 + $timestr = $event ? strtotime( $event['start']['dateTime'] ) : '';
12 15
13 - $timetics_event = $this->booking->get_event();
14 - $timetics_join_link = 'google-meet' === $timetics_location_type && ! empty( $timetics_event['hangoutLink'] ) ? $timetics_event['hangoutLink'] : '';
15 - $timetics_timezone = $timetics_event ? $timetics_event['start']['timeZone'] : '';
16 - $timetics_timestr = $timetics_event ? strtotime( $timetics_event['start']['dateTime'] ) : '';
16 + $day = gmdate( 'l', strtotime( $this->booking->get_start_date() ) );
17 + $time = gmdate( 'h:i a', strtotime( $this->booking->get_start_time() ) );
18 + $date = gmdate( 'd F Y', strtotime( $this->booking->get_start_date() ) );
17 19
18 - // Use WordPress date and time format settings
19 - $timetics_formatted = timetics_format_email_datetime( $this->booking->get_start_date(), $this->booking->get_start_time() );
20 - $timetics_day = $timetics_formatted['day'];
21 - $timetics_time = $timetics_formatted['time'];
22 - $timetics_date = $timetics_formatted['date'];
20 + $email_body = timetics_get_option( 'booking_rescheduled_customer_email_body' );
21 + $email_title = timetics_get_option( 'booking_rescheduled_customer_email_title' );
22 + $email_title = ! empty( $email_title ) ? $email_title : $this->get_title();
23 23
24 - $timetics_email_body = timetics_get_option( 'booking_rescheduled_customer_email_body' );
25 - $timetics_email_title = timetics_get_option( 'booking_rescheduled_customer_email_title' );
26 - $timetics_email_title = ! empty( $timetics_email_title ) ? $timetics_email_title : $this->get_title();
27 -
28 - $timetics_placeholders = [
24 + $placeholders = [
29 25 '{%meeting_title%}' => $this->meeting->get_name(),
30 - '{%meeting_date%}' => $timetics_date,
31 - '{%meeting_time%}' => $timetics_time,
32 - '{%meeting_location%}' => $timetics_location,
26 + '{%meeting_date%}' => $date,
27 + '{%meeting_time%}' => $time,
28 + '{%meeting_location%}' => $location,
33 29 '{%meeting_duration%}' => $this->meeting->get_duration(),
34 - '{%host_name%}' => $timetics_staff_name,
30 + '{%host_name%}' => $staff_name,
35 31 '{%host_email%}' => $this->staff->get_email(),
36 - '{%customer_name%}' => $timetics_customer_name,
37 - '{%customer_email%}' => $timetics_customer_email,
32 + '{%customer_name%}' => $customer_name,
33 + '{%customer_email%}' => $customer_email,
38 34 ];
39 35 ?>
40 36
41 37 <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;">
@@ -43,15 +39,15 @@
43 39 <div class="email-content" style="padding: 40px; background-color: #ffffff; border-radius: 0 0 12px 12px; border-top: 4px solid #3161F1; margin-bottom: 40px;">
44 40 <?php do_action('timetics_email_header') ;?>
45 41 <div class="email-title">
46 42 <h3 style="color: #3161F1; font-size: 24px; font-weight: 600; margin: 30px 0;">
47 - <?php echo esc_html( timetics_replace_placeholder( $timetics_email_title, $timetics_placeholders ) ); ?>
43 + <?php echo esc_html( timetics_replace_placeholder( $email_title, $placeholders ) ); ?>
48 44 </h3>
49 45 </div>
50 - <?php if ( $timetics_email_body ): ?>
46 + <?php if ( $email_body ): ?>
51 47
52 - <?php echo wp_kses( timetics_replace_placeholder( $timetics_email_body, $timetics_placeholders ), 'post' ); ?>
53 - <?php if ( 'google-meet' === $timetics_location_type && $timetics_join_link ): ?>
48 + <?php echo wp_kses( timetics_replace_placeholder( $email_body, $placeholders ), 'post' ); ?>
49 + <?php if ( 'virtual' === $location_type && $join_link ): ?>
54 50 <div class="single-data-entry" style="margin: 10px 0 20px;">
55 51 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
56 52 <?php esc_html_e( 'Location:', 'timetics' );?>
57 53 </p>
@@ -56,9 +52,9 @@
56 52 <?php esc_html_e( 'Location:', 'timetics' );?>
57 53 </p>
58 54 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
59 55 <?php echo esc_html__('Joining link:', 'timetics') ;?>
60 - <a style="color: #3161F1" href="<?php echo esc_url( $timetics_join_link ); ?>"><?php echo esc_url( $timetics_join_link ); ?></a>
56 + <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
61 57 </p>
62 58 </div>
63 59 <?php endif;?>
64 60 <?php do_action( 'timetics_new_event_email', $this->booking, 'customer' ); ?>
@@ -64,11 +60,9 @@
64 60 <?php do_action( 'timetics_new_event_email', $this->booking, 'customer' ); ?>
65 61 <?php else: ?>
66 62
67 63 <p class="greeting" style="color: #556880; margin-bottom: 5px">
68 - <?php
69 - /* translators: %s: Recipient name */
70 - printf( esc_html__( 'Hi %s,', 'timetics' ), esc_html( $timetics_customer_name ) );?>
64 + <?php printf( esc_html__( 'Hi %s,', 'timetics' ), esc_html( $customer_name ) );?>
71 65 </p>
72 66
73 67 <p style="color: #556880; margin-bottom: 5px"><?php esc_attr_e( 'Meeting has been rescheduled', 'timetics' );?></p>
74 68
@@ -75,9 +69,9 @@
75 69 <div class="data-wrapper" style="border: 1px solid #E2ECF4; border-radius: 12px; padding: 30px; margin: 24px 0;">
76 70 <div class="single-data-entry" style="margin: 0 0 20px;">
77 71 <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>
78 72 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
79 - <?php echo esc_html( timetics_replace_placeholder( $timetics_email_title, $timetics_placeholders ) ); ?>
73 + <?php echo esc_html( timetics_replace_placeholder( $email_title, $placeholders ) ); ?>
80 74 </p>
81 75
82 76 </div>
83 77 <div class="single-data-entry" style="margin: 0 0 20px;">
@@ -82,36 +76,34 @@
82 76 </div>
83 77 <div class="single-data-entry" style="margin: 0 0 20px;">
84 78 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;"><?php echo esc_html__( 'Staff:', 'timetics' ); ?></p>
85 79 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
86 - <?php echo esc_html( $timetics_staff_name );?> -
87 - <a style="color: #3161F1" href="mailto:<?php echo esc_attr( $timetics_staff_email )?>"><?php echo esc_html( $timetics_staff_email ); ?></a>
80 + <?php echo esc_html( $staff_name );?> -
81 + <a style="color: #3161F1" href="mailto:<?php echo esc_attr( $staff_email )?>"><?php echo esc_html( $staff_email ); ?></a>
88 82 </p>
89 83 </div>
90 84
91 85 <div class="single-data-entry" style="margin: 10px 0 20px;">
92 86 <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>
93 - <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php
94 - /* translators: 1: Time, 2: Day, 3: Date */
95 - printf( esc_html__( '%1$s, %2$s %3$s', 'timetics' ), esc_html( $timetics_time ), esc_html( $timetics_day ), esc_html( $timetics_date ), esc_html( $timetics_timezone ) );?></p>
87 + <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php printf( esc_html__( '%s, %s %s', 'timetics' ), esc_html( $time ), esc_html( $day ), esc_html( $date ), esc_html( $timezone ) );?></p>
96 88 </div>
97 89
98 - <?php if ( 'google-meet' === $timetics_location_type && $timetics_join_link ): ?>
90 + <?php if ( 'virtual' === $location_type && $join_link ): ?>
99 91 <div class="single-data-entry" style="margin: 10px 0 20px;">
100 92 <p style="font-weight: 600; font-size: 14px; line-height: 1; color: #0C274A; margin: 0 0 5px;">
101 93 <?php esc_html_e( 'Location:', 'timetics' );?>
102 94 </p>
103 - <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">
95 + <img width="110" style="margin: 5px 0;" src="https://arraytics.dev/social-icons/google-meet.png" alt="Google Meet">
104 96 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;">
105 97 <?php echo esc_html__('Joining link:', 'timetics') ;?>
106 - <a style="color: #3161F1" href="<?php echo esc_url( $timetics_join_link ); ?>"><?php echo esc_url( $timetics_join_link ); ?></a>
98 + <a style="color: #3161F1" href="<?php echo esc_url( $join_link ); ?>"><?php echo esc_url( $join_link ); ?></a>
107 99 </p>
108 100 </div>
109 101 <?php endif;?>
110 - <?php if($timetics_timezone) :?>
102 + <?php if($timezone) :?>
111 103 <div class="single-data-entry" style="margin: 10px 0 20px;">
112 104 <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>
113 - <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html( $timetics_timezone ); ?></p>
105 + <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html( $timezone ); ?></p>
114 106 </div>
115 107 <?php endif;?>
116 108 </div>
117 109 <?php endif;?>
@@ -116,7 +108,7 @@
116 108 </div>
117 109 <?php endif;?>
118 110 <p style="font-weight: 400; font-size: 14px; color: #556880; margin: 0;"><?php echo esc_html__('Thank you!', 'timetics'); ?></p>
119 111 </div>
120 - <?php do_action('timetics_email_footer', $timetics_customer_email) ;?>
112 + <?php do_action('timetics_email_footer', $customer_email) ;?>
121 113 </div>
122 -</div>
114 +</div>