PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.62
Timetics – Appointment Booking Calendar & Scheduling v1.0.62
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 / core / emails / customer-booking-reminder-email.php

customer-booking-reminder-email.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.62, at core/emails/customer-booking-reminder-email.php

96 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * New event email class
4 *
5 * @package Timetics
6 */
7 namespace Timetics\Core\Emails;
8
9 defined( 'ABSPATH' ) || exit;
10
11 use Timetics\Core\Appointments\Appointment;
12 use Timetics\Core\Bookings\Booking;
13 use Timetics\Core\Customers\Customer;
14 use Timetics\Core\Staffs\Staff;
15
16 class Customer_Booking_Reminder_Email extends Email {
17
18 /**
19 * Store booking object
20 *
21 * @var Object
22 */
23 public $booking;
24
25 /**
26 * Store staff object
27 *
28 * @var Object
29 */
30 public $staff;
31
32 /**
33 * Store customer object
34 *
35 * @var Object
36 */
37 public $customer;
38
39 /**
40 * Store meeting object
41 *
42 * @var Object
43 */
44 public $meeting;
45
46 /**
47 * New Event Email Constructor
48 *
49 * @return void
50 */
51 public function __construct( Booking $booking ) {
52 $this->booking = $booking;
53 $this->meeting = new Appointment( $booking->get_appointment() );
54 $this->staff = new Staff( $booking->get_staff_id() );
55 $this->customer = new Customer( $booking->get_customer_id() );
56
57 parent::__construct();
58 }
59
60 /**
61 * Get email recipient
62 *
63 * @return string
64 */
65 public function get_recipient() {
66 return $this->customer->get_email();
67 }
68
69 /**
70 * Get new event email
71 *
72 * @return string
73 */
74 public function get_subject() {
75 return $this->meeting->get_name();
76 }
77
78 /**
79 * Get email title
80 *
81 * @return string
82 */
83 public function get_title() {
84 return $this->meeting->get_name();
85 }
86
87 /**
88 * Get template new event email
89 *
90 * @return string
91 */
92 public function get_template() {
93 return TIMETICS_PLUGIN_DIR . '/templates/emails/customer-booking-reminder.php';
94 }
95 }
96