PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.3
Booktics – Appointment Booking Calendar for Service Businesses v1.0.3
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 / trunk / core / admin / notification.php

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

284 lines 7.7 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' => 'Customer Name',
62 'value' => 'customer_name',
63 'type' => 'string',
64 ),
65 array(
66 'label' => 'User Email',
67 'value' => 'user_email',
68 'type' => 'string',
69 ),
70 ),
71 'delay_dependencies' => array(
72 array(
73 'label' => 'Order Date',
74 'value' => 'order_date',
75 ),
76 ),
77 'email_receivers' => array(
78 array(
79 'label' => 'User Email',
80 'value' => 'user_email',
81 ),
82 ),
83 ),
84 array(
85 'trigger_label' => 'Appointment Scheduled',
86 'trigger_value' => 'appointment_scheduled',
87 'trigger_data' => array(
88 array(
89 'label' => 'Service Name',
90 'value' => 'appointment_service',
91 'type' => 'string',
92 ),
93 array(
94 'label' => 'Team Member Name',
95 'value' => 'appointment_team_member',
96 'type' => 'string',
97 ),
98 array(
99 'label' => 'Appointment Date',
100 'value' => 'appointment_date',
101 'type' => 'date',
102 ),
103 array(
104 'label' => 'Appointment Start Time',
105 'value' => 'start_time',
106 'type' => 'string',
107 ),
108 array(
109 'label' => 'Appointment Time',
110 'value' => 'appointment_time',
111 'type' => 'date',
112 ),
113 array(
114 'label' => 'Attendee Count',
115 'value' => 'attendee_count',
116 'type' => 'string',
117 ),
118 array(
119 'label' => 'Customer Name',
120 'value' => 'customer_name',
121 'type' => 'string',
122 ),
123 array(
124 'label' => 'User Email',
125 'value' => 'user_email',
126 'type' => 'string',
127 ),
128 ),
129 'delay_dependencies' => array(
130 array(
131 'label' => 'Appointment Time',
132 'value' => 'before_appointment_time',
133 ),
134 ),
135 'email_receivers' => array(
136 array(
137 'label' => 'User Email',
138 'value' => 'user_email',
139 ),
140 ),
141 ),
142 array(
143 'trigger_label' => 'Appointment Rescheduled',
144 'trigger_value' => 'appointment_rescheduled',
145 'trigger_data' => array(
146 array(
147 'label' => 'Service Name',
148 'value' => 'appointment_service',
149 'type' => 'string',
150 ),
151 array(
152 'label' => 'Date',
153 'value' => 'date',
154 'type' => 'date',
155 ),
156 array(
157 'label' => 'Team Member Name',
158 'value' => 'appointment_team_member',
159 'type' => 'string',
160 ),
161 array(
162 'label' => 'Start Time',
163 'value' => 'start_time',
164 'type' => 'string',
165 ),
166 array(
167 'label' => 'End Time',
168 'value' => 'end_time',
169 'type' => 'string',
170 ),
171 array(
172 'label' => 'Customer Name',
173 'value' => 'customer_name',
174 'type' => 'string',
175 ),
176 array(
177 'label' => 'User Email',
178 'value' => 'user_email',
179 'type' => 'string',
180 ),
181 ),
182 'delay_dependencies' => array(
183 array(
184 'label' => 'Date',
185 'value' => 'date',
186 ),
187 ),
188 'email_receivers' => array(
189 array(
190 'label' => 'User Email',
191 'value' => 'user_email',
192 ),
193 ),
194 ),
195 array(
196 'trigger_label' => 'Appointment Cancelled',
197 'trigger_value' => 'appointment_cancelled',
198 'trigger_data' => array(
199 array(
200 'label' => 'Service Name',
201 'value' => 'appointment_service',
202 'type' => 'string',
203 ),
204 array(
205 'label' => 'Date',
206 'value' => 'date',
207 'type' => 'date',
208 ),
209 array(
210 'label' => 'Team Member Name',
211 'value' => 'appointment_team_member',
212 'type' => 'string',
213 ),
214 array(
215 'label' => 'Start Time',
216 'value' => 'start_time',
217 'type' => 'string',
218 ),
219 array(
220 'label' => 'End Time',
221 'value' => 'end_time',
222 'type' => 'string',
223 ),
224 array(
225 'label' => 'Customer Name',
226 'value' => 'customer_name',
227 'type' => 'string',
228 ),
229 array(
230 'label' => 'User Email',
231 'value' => 'user_email',
232 'type' => 'string',
233 ),
234 ),
235 'delay_dependencies' => array(
236 array(
237 'label' => 'Date',
238 'value' => 'date',
239 ),
240 ),
241 'email_receivers' => array(
242 array(
243 'label' => 'User Email',
244 'value' => 'user_email',
245 ),
246 ),
247 ),
248 array(
249 'trigger_label' => 'Team Member Created',
250 'trigger_value' => 'team_member_created',
251 'trigger_data' => array(
252 array(
253 'label' => 'Team Member Name',
254 'value' => 'team_member_name',
255 'type' => 'string',
256 ),
257 array(
258 'label' => 'Team Member Email',
259 'value' => 'team_member_email',
260 'type' => 'string',
261 ),
262 array(
263 'label' => 'Password Reset URL',
264 'value' => 'password_reset_url',
265 'type' => 'string',
266 ),
267 ),
268 'delay_dependencies' => array(),
269 'email_receivers' => array(
270 array(
271 'label' => 'Team Member Email',
272 'value' => 'team_member_email',
273 ),
274 ),
275 ),
276 );
277
278 return $actions;
279 }
280 );
281 }
282 }
283 }
284