PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.63
Timetics – Appointment Booking Calendar & Scheduling v1.0.63
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 / update-event-email.php

update-event-email.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.63, at core/emails/update-event-email.php

105 lines 1.9 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 Update_Event_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 event object
34 *
35 * @var Object
36 */
37 public $event;
38
39 /**
40 * Store customer object
41 *
42 * @var Object
43 */
44 public $customer;
45
46 /**
47 * Store meeting object
48 *
49 * @var Object
50 */
51 public $meeting;
52
53 /**
54 * New Event Email Constructor
55 *
56 * @return void
57 */
58 public function __construct( Booking $booking ) {
59 $this->booking = $booking;
60 $this->meeting = new Appointment( $booking->get_appointment() );
61 $this->staff = new Staff( $booking->get_staff_id() );
62 $this->customer = new Customer( $booking->get_customer_id() );
63
64 apply_filters( 'timetics/booking/update', $booking, $this );
65
66 parent::__construct();
67 }
68
69 /**
70 * Get email recipient
71 *
72 * @return string
73 */
74 public function get_recipient() {
75 return $this->staff->get_email();
76 }
77
78 /**
79 * Get new event email
80 *
81 * @return string
82 */
83 public function get_subject() {
84 return $this->meeting->get_name();
85 }
86
87 /**
88 * Get email title
89 *
90 * @return string
91 */
92 public function get_title() {
93 return $this->meeting->get_name();
94 }
95
96 /**
97 * Get template new event email
98 *
99 * @return string
100 */
101 public function get_template() {
102 return TIMETICS_PLUGIN_DIR . '/templates/emails/update-event.php';
103 }
104 }
105