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

82 lines 3.7 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 $timezone = $event ? $event['start']['timeZone'] : '';
14 $timestr = $event ? strtotime( $event['start']['dateTime'] ) : '';
15
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() ) );
19
20 $email_body = timetics_get_option( 'booking_created_host_email_body' );
21 $email_title = timetics_get_option( 'booking_created_host_email_title' );
22 $email_title = ! empty( $email_title ) ? $email_title : $this->get_title();
23
24 $placeholders = [
25 '{%meeting_title%}' => $this->meeting->name,
26 '{%meeting_date%}' => $date,
27 '{%meeting_time%}' => $time,
28 '{%meeting_location%}' => $location,
29 '{%meeting_duration%}' => $this->meeting->duration,
30 '{%host_name%}' => $staff_name,
31 '{%host_email%}' => $this->staff->get_email(),
32 '{%customer_name%}' => $customer_name,
33 '{%customer_email%}' => $customer_email,
34 ];
35 ?>
36
37 <main class="email-wrapper">
38 <div class="email-title"><h3><?php echo esc_html( timetics_replace_placeholder( $email_title, $placeholders ) ); ?></h3></div>
39
40 <div class="email-content">
41 <?php if ( $email_body ): ?>
42 <?php echo timetics_replace_placeholder( $email_body, $placeholders ); ?>
43 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
44 <p><?php esc_html_e( 'Location: This is a Google Meet web conference.', 'timetics' );?>
45 </p>
46 <span><a href="<?php echo esc_url( $join_link ); ?>"><?php esc_html_e( 'Join Now', 'timetics' );?></a></span>
47 <?php endif;?>
48
49 <?php do_action( 'timetics_new_event_email', $this->booking ); ?>
50
51 <?php else: ?>
52 <p class="greeting">
53 <?php printf( esc_html__( 'Hi %s', 'timetics' ), esc_html( $customer_name ) );?>
54 </p>
55 <p><?php esc_attr_e( 'A new meeting has been scheduled', 'timetics' );?></p>
56 <p>
57 <?php printf( '%s %s', esc_html__( 'Staff:', 'timetics' ), esc_html( $staff_name ) );?>
58 <br>
59 <?php printf( '%s %s', esc_html__( 'Staff Email:', 'timetics' ), esc_html( $staff_email ) );?>
60 </p>
61 <p>
62 <?php printf( esc_html__( 'Meeting Date/Time: %s - %s, %s %s', 'timetics' ), esc_html( $time ), esc_html( $day ), esc_html( $date ), esc_html( $timezone ) );?>
63 </p>
64 <p>
65 <?php printf( '%s %s', esc_html__( 'Description:', 'timetics' ), esc_html( $description ) );?>
66 </p>
67
68 <?php if ( 'google-meet' === $location_type && $join_link ): ?>
69 <p><?php esc_html_e( 'Location: This is a Google Meet web conference.', 'timetics' );?>
70 </p>
71 <span><a href="<?php echo esc_url( $join_link ); ?>"><?php esc_html_e( 'Join Now', 'timetics' );?></a></span>
72 <?php endif;?>
73
74 <?php do_action( 'timetics_new_event_email', $this->booking ); ?>
75
76 <p>
77 <?php printf( '%s %s', esc_html__( 'Invitee Time Zone:', 'timetics' ), esc_html( $timezone ) );?>
78 </p>
79 <?php endif;?>
80 </div>
81 </main>
82