PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.1
Booktics – Appointment Booking Calendar for Service Businesses v1.0.1
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 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.2 1.0.3 All 31 releases
booktics / core / admin / notification.php

notification.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.1, at core/admin/notification.php

264 lines 7.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Booktics\Admin;
4
5 use Booktics\Contracts\Hookable_Service_Contract;
6 use ENS\Core\SDK;
7
8 class Notification implements Hookable_Service_Contract {
9
10 /**
11 * Register notification
12 *
13 * @return void
14 */
15 public function register() {
16 if ( class_exists( SDK::class ) ) {
17 SDK::get_instance()
18 ->setup(
19 array(
20 'plugin_name' => 'Booktics',
21 'plugin_slug' => 'booktics',
22 'general_prefix' => 'bt',
23 'text_domain' => 'booktics',
24 'admin_script_handler' => 'booktics-dashboard-scripts',
25 'sub_menu_filter_hook' => 'booktics_menu',
26 'sub_menu_details' =>
27 array(
28 'id' => 'booktics-automation',
29 'title' => __( 'Automation', 'booktics' ),
30 'link' => '/automation',
31 'capability' => apply_filters( 'booktics_menu_permission_automation_dashboard', 'manage_options' ),
32 'position' => apply_filters( 'booktics_menu_position_automation', 11 ),
33 ),
34 )
35 )
36 ->init();
37
38 add_filter(
39 'ens_available_actions', function ( $actions ) {
40 $actions = array(
41 array(
42 'trigger_label' => 'Order Created',
43 'trigger_value' => 'order_created',
44 'trigger_data' => array(
45 array(
46 'label' => 'Order No',
47 'value' => 'order_no',
48 'type' => 'string',
49 ),
50 array(
51 'label' => 'Order Date',
52 'value' => 'order_date',
53 'type' => 'date',
54 ),
55 array(
56 'label' => 'Order Total',
57 'value' => 'order_total',
58 'type' => 'string',
59 ),
60 array(
61 'label' => 'User Email',
62 'value' => 'user_email',
63 'type' => 'string',
64 ),
65 ),
66 'delay_dependencies' => array(
67 array(
68 'label' => 'Order Date',
69 'value' => 'order_date',
70 ),
71 ),
72 'email_receivers' => array(
73 array(
74 'label' => 'User Email',
75 'value' => 'user_email',
76 ),
77 ),
78 ),
79 array(
80 'trigger_label' => 'Appointment Scheduled',
81 'trigger_value' => 'appointment_scheduled',
82 'trigger_data' => array(
83 array(
84 'label' => 'Service Name',
85 'value' => 'appointment_service',
86 'type' => 'string',
87 ),
88 array(
89 'label' => 'Team Member Name',
90 'value' => 'appointment_team_member',
91 'type' => 'string',
92 ),
93 array(
94 'label' => 'Appointment Date',
95 'value' => 'appointment_date',
96 'type' => 'date',
97 ),
98 array(
99 'label' => 'Appointment Start Time',
100 'value' => 'start_time',
101 'type' => 'string',
102 ),
103 array(
104 'label' => 'Appointment Time',
105 'value' => 'appointment_time',
106 'type' => 'date',
107 ),
108 array(
109 'label' => 'Attendee Count',
110 'value' => 'attendee_count',
111 'type' => 'string',
112 ),
113 array(
114 'label' => 'User Email',
115 'value' => 'user_email',
116 'type' => 'string',
117 ),
118 ),
119 'delay_dependencies' => array(
120 array(
121 'label' => 'Appointment Time',
122 'value' => 'before_appointment_time',
123 ),
124 ),
125 'email_receivers' => array(
126 array(
127 'label' => 'User Email',
128 'value' => 'user_email',
129 ),
130 ),
131 ),
132 array(
133 'trigger_label' => 'Appointment Rescheduled',
134 'trigger_value' => 'appointment_rescheduled',
135 'trigger_data' => array(
136 array(
137 'label' => 'Service Name',
138 'value' => 'appointment_service',
139 'type' => 'string',
140 ),
141 array(
142 'label' => 'Date',
143 'value' => 'date',
144 'type' => 'date',
145 ),
146 array(
147 'label' => 'Team Member Name',
148 'value' => 'appointment_team_member',
149 'type' => 'string',
150 ),
151 array(
152 'label' => 'Start Time',
153 'value' => 'start_time',
154 'type' => 'string',
155 ),
156 array(
157 'label' => 'End Time',
158 'value' => 'end_time',
159 'type' => 'string',
160 ),
161 array(
162 'label' => 'User Email',
163 'value' => 'user_email',
164 'type' => 'string',
165 ),
166 ),
167 'delay_dependencies' => array(
168 array(
169 'label' => 'Date',
170 'value' => 'date',
171 ),
172 ),
173 'email_receivers' => array(
174 array(
175 'label' => 'User Email',
176 'value' => 'user_email',
177 ),
178 ),
179 ),
180 array(
181 'trigger_label' => 'Appointment Cancelled',
182 'trigger_value' => 'appointment_cancelled',
183 'trigger_data' => array(
184 array(
185 'label' => 'Service Name',
186 'value' => 'appointment_service',
187 'type' => 'string',
188 ),
189 array(
190 'label' => 'Date',
191 'value' => 'date',
192 'type' => 'date',
193 ),
194 array(
195 'label' => 'Team Member Name',
196 'value' => 'appointment_team_member',
197 'type' => 'string',
198 ),
199 array(
200 'label' => 'Start Time',
201 'value' => 'start_time',
202 'type' => 'string',
203 ),
204 array(
205 'label' => 'End Time',
206 'value' => 'end_time',
207 'type' => 'string',
208 ),
209 array(
210 'label' => 'User Email',
211 'value' => 'user_email',
212 'type' => 'string',
213 ),
214 ),
215 'delay_dependencies' => array(
216 array(
217 'label' => 'Date',
218 'value' => 'date',
219 ),
220 ),
221 'email_receivers' => array(
222 array(
223 'label' => 'User Email',
224 'value' => 'user_email',
225 ),
226 ),
227 ),
228 array(
229 'trigger_label' => 'Team Member Created',
230 'trigger_value' => 'team_member_created',
231 'trigger_data' => array(
232 array(
233 'label' => 'Team Member Name',
234 'value' => 'team_member_name',
235 'type' => 'string',
236 ),
237 array(
238 'label' => 'Team Member Email',
239 'value' => 'team_member_email',
240 'type' => 'string',
241 ),
242 array(
243 'label' => 'Password Reset URL',
244 'value' => 'password_reset_url',
245 'type' => 'string',
246 ),
247 ),
248 'delay_dependencies' => array(),
249 'email_receivers' => array(
250 array(
251 'label' => 'Team Member Email',
252 'value' => 'team_member_email',
253 ),
254 ),
255 ),
256 );
257
258 return $actions;
259 }
260 );
261 }
262 }
263 }
264