PluginProbe
YayMail – WooCommerce Email Customizer / trunk
YayMail – WooCommerce Email Customizer vtrunk
4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 3.4.2 3.4.3 All 55 releases
yaymail / src / TemplateLibrary / Templates / Processing / OrderJourney.php

OrderJourney.php in YayMail – WooCommerce Email Customizer trunk, at src/TemplateLibrary/Templates/Processing/OrderJourney.php

553 lines 29.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace YayMail\TemplateLibrary\Templates\Processing;
4
5 use YayMail\Abstracts\BaseTemplate;
6 use YayMail\Elements\BillingAddress;
7 use YayMail\Elements\Button;
8 use YayMail\Elements\Column;
9 use YayMail\Elements\ColumnLayout;
10 use YayMail\Elements\Heading;
11 use YayMail\Elements\Logo;
12 use YayMail\Elements\OrderDetails;
13 use YayMail\Elements\OrderProgress;
14 use YayMail\Elements\ShippingAddress;
15 use YayMail\Elements\SocialIcon;
16 use YayMail\Elements\Text;
17 use YayMail\Utils\SingletonTrait;
18
19 /**
20 * Order Journey template for Processing Order email.
21 */
22 class OrderJourney extends BaseTemplate {
23 use SingletonTrait;
24
25 public function __construct() {
26 parent::__construct();
27 $this->id = 'processing_order_v4';
28 $this->email_type = 'customer_processing_order';
29 $this->name = 'Order Journey';
30 $this->description = 'Emphasizes the order progress timeline.';
31 $this->categories = [ 'Purple Collection', 'Progress collection' ];
32 $this->template_settings = [
33 'text_link_color' => '#1A1A1A',
34 ];
35 $this->access = 'free';
36 $this->elements = [
37 ColumnLayout::get_object_data(
38 4,
39 [
40 'children' => [
41 Column::get_object_data(
42 29,
43 [
44 'children' => [
45 Logo::get_object_data(
46 [
47 'padding' => [
48 'top' => '10',
49 'right' => '10',
50 'bottom' => '10',
51 'left' => '0',
52 ],
53 'background_color' => '#ffffff',
54 'src' => 'https://images.wpbrandy.com/uploads/woocommerce-logo.png',
55 'align' => 'left',
56 'width' => '116',
57 'alt' => 'Store logo',
58 ]
59 ),
60 ],
61 ]
62 ),
63 Column::get_object_data(
64 34.49,
65 [
66 'children' => [
67 Text::get_object_data(
68 [
69 'padding' => [
70 'top' => '15',
71 'right' => '0',
72 'bottom' => '15',
73 'left' => '0',
74 ],
75 'background_color' => '#ffffff',
76 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
77 'text_color' => '#333333',
78 'rich_text' => '<p style="text-align: right"><span style="font-size: 14px;font-weight: 400">My Account</span></p>',
79 ]
80 ),
81 ],
82 ]
83 ),
84 Column::get_object_data(
85 27.76,
86 [
87 'children' => [
88 Text::get_object_data(
89 [
90 'padding' => [
91 'top' => '15',
92 'right' => '0',
93 'bottom' => '15',
94 'left' => '0',
95 ],
96 'background_color' => '#ffffff',
97 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
98 'text_color' => '#1a1a1a',
99 'rich_text' => '<p style="text-align: center"><span style="font-size: 14px">Order Tracking</span></p>',
100 ]
101 ),
102 ],
103 ]
104 ),
105 Column::get_object_data(
106 8.75,
107 [
108 'children' => [
109 Text::get_object_data(
110 [
111 'padding' => [
112 'top' => '15',
113 'right' => '2',
114 'bottom' => '15',
115 'left' => '0',
116 ],
117 'background_color' => '#ffffff',
118 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
119 'text_color' => '#1a1a1a',
120 'rich_text' => '<p style="text-align: right"><span style="font-size: 14px;font-weight: 400">Contact</span></p>',
121 ]
122 ),
123 ],
124 ]
125 ),
126 ],
127 'padding' => [
128 'top' => 15,
129 'right' => '50',
130 'bottom' => 15,
131 'left' => '50',
132 ],
133 'background_color' => '#ffffff',
134 ]
135 ),
136 ColumnLayout::get_object_data(
137 1,
138 [
139 'children' => [
140 Column::get_object_data(
141 100,
142 [
143 'children' => [
144 Text::get_object_data(
145 [
146 'padding' => [
147 'top' => 0,
148 'right' => '50',
149 'bottom' => 0,
150 'left' => '50',
151 ],
152 'background_color' => '#ffffff00',
153 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
154 'text_color' => '#84ff7c',
155 'rich_text' => '<p style="text-align: center"><span style="white-space: pre-wrap;font-size: 12px;font-weight: bold">ORDER CONFIRMED!</span></p>',
156 ]
157 ),
158 Heading::get_object_data(
159 [
160 'padding' => [
161 'top' => '0',
162 'right' => '0',
163 'bottom' => '0',
164 'left' => '0',
165 ],
166 'background_color' => '#7f54b300',
167 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
168 'rich_text' => '<p style="font-size: 36px; font-weight: bold; text-align: center; margin: 12px 0;"><span style="font-size: 48px; line-height: 1.2 !important;">New Order Received</span><br /><span style="font-size: 48px; line-height: 1.2 !important;">Please Review</span></p>',
169 ]
170 ),
171 Text::get_object_data(
172 [
173 'padding' => [
174 'top' => '0',
175 'right' => '0',
176 'bottom' => '0',
177 'left' => '0',
178 ],
179 'background_color' => '#7f54b300',
180 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
181 'rich_text' => '<p style="text-align: center"><span style="font-size: 14px;color: #ffffff;font-weight: 400">Order placed on [yaymail_order_date]</span></p>
182 <p style="text-align: center"><span style="font-size: 14px;font-weight: 400"><span style="color: #ffffff">Number ID #[yaymail_order_id is_plain="true"]</span></span></p>',
183 ]
184 ),
185 ],
186 ]
187 ),
188 ],
189 'padding' => [
190 'top' => 27,
191 'right' => '50',
192 'bottom' => 27,
193 'left' => '50',
194 ],
195 'background_color' => '#ffffff',
196 'background_image' => [
197 'url' => 'https://images.wpbrandy.com/uploads/processing-4-img-1.png',
198 'position' => 'custom',
199 'size' => 'cover',
200 'repeat' => 'no-repeat',
201 'y_position' => 6,
202 'x_position' => 10,
203 'custom_size' => 100,
204 ],
205 ]
206 ),
207 ColumnLayout::get_object_data(
208 1,
209 [
210 'children' => [
211 Column::get_object_data(
212 100,
213 [
214 'children' => [
215 OrderProgress::get_object_data(
216 [
217 'padding' => [
218 'top' => 30,
219 'right' => '40',
220 'bottom' => 30,
221 'left' => '40',
222 ],
223 'display_style' => 'filled_bar',
224 'connector_height' => '3',
225 'connector_active_color' => '#723af50f',
226 'connector_inactive_color' => '#723af50f',
227 'label_active_color' => '#723af5',
228 'label_inactive_color' => '#723af5',
229 'icon_size' => '17',
230 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
231 'steps' => [
232 [
233 'title' => 'Ordered',
234 'image_url' => YAYMAIL_PLUGIN_URL . 'assets/images/check.png',
235 'image_bg_color' => '#723af5',
236 'icon_border_color' => '#723af5',
237 'icon_border_style' => 'solid',
238 'icon_border_width' => 2,
239 ],
240 [
241 'title' => 'Processing',
242 'image_url' => YAYMAIL_PLUGIN_URL . 'assets/images/process.png',
243 'image_bg_color' => '#d1befe',
244 'icon_border_color' => '#d1befe',
245 'icon_border_style' => 'solid',
246 'icon_border_width' => 2,
247 ],
248 [
249 'title' => 'Completed',
250 'image_url' => YAYMAIL_PLUGIN_URL . 'assets/images/check.png',
251 'image_bg_color' => '#d1befe00',
252 'icon_border_color' => '#d1befe',
253 'icon_border_style' => 'dashed',
254 'icon_border_width' => 3,
255 ],
256 ],
257 ]
258 ),
259 ],
260 'border' => [
261 'side' => 'all',
262 'width' => '1',
263 'style' => 'solid',
264 'color' => '#0000001a',
265 'custom' => [
266 'top' => '1',
267 'right' => '1',
268 'bottom' => '1',
269 'left' => '1',
270 ],
271 ],
272 ]
273 ),
274 ],
275 'padding' => [
276 'top' => 30,
277 'right' => 50,
278 'bottom' => 20,
279 'left' => 50,
280 ],
281 'background_color' => '#ffffff',
282 'inner_border_radius' => [
283 'top_left' => 16,
284 'top_right' => 16,
285 'bottom_left' => 16,
286 'bottom_right' => 16,
287 ],
288 ]
289 ),
290 ColumnLayout::get_object_data(
291 1,
292 [
293 'children' => [
294 Column::get_object_data(
295 100,
296 [
297 'children' => [
298 Text::get_object_data(
299 [
300 'padding' => [
301 'top' => 0,
302 'right' => 0,
303 'bottom' => '8',
304 'left' => 0,
305 ],
306 'background_color' => '#ffffff',
307 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
308 'text_color' => '#1a1a1a',
309 'rich_text' => '<p><span style="font-size: 16px">Hi <strong>[yaymail_billing_first_name]</strong>,</span></p>
310 <p><span style="font-size: 16px">Thanks for your order!</span></p>
311 <p><span style="font-size: 16px">We\'ve successfully received it and it\'s now being processed. We\'ll notify you as soon as your order is shipped.</span></p>',
312 ]
313 ),
314 ],
315 ]
316 ),
317 ],
318 'padding' => [
319 'top' => 10,
320 'right' => '50',
321 'bottom' => 10,
322 'left' => '50',
323 ],
324 'background_color' => '#ffffff',
325 ]
326 ),
327 OrderDetails::get_object_data(
328 [
329 'padding' => [
330 'top' => 15,
331 'right' => '50',
332 'bottom' => 15,
333 'left' => '50',
334 ],
335 'layout_type' => 'legacy',
336 'title' => '<span style="font-size: 20px;font-weight: 600">Order Summary</span>',
337 'title_color' => '#1a1a1a',
338 'text_color' => '#1a1a1a',
339 'border_color' => '#1a1a1a',
340 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
341 'table_heading_font_size' => 16,
342 ]
343 ),
344 Button::get_object_data(
345 [
346 'padding' => [
347 'top' => '16',
348 'right' => '50',
349 'bottom' => '16',
350 'left' => '50',
351 ],
352 'background_color' => '#ffffff',
353 'align' => 'left',
354 'width' => '50%',
355 'button_background_color' => '#723af5',
356 'border_radius' => [
357 'top_left' => '30',
358 'top_right' => '30',
359 'bottom_right' => '30',
360 'bottom_left' => '30',
361 ],
362 'text' => 'View Your Order',
363 'url' => '[yaymail_order_url]',
364 'font_size' => '16',
365 'weight' => '500',
366 'font_family' => '"Rethink Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
367 ]
368 ),
369 ColumnLayout::get_object_data(
370 2,
371 [
372 'children' => [
373 Column::get_object_data(
374 50,
375 [
376 'children' => [
377 ShippingAddress::get_object_data(
378 [
379 'padding' => [
380 'top' => 25,
381 'right' => 0,
382 'bottom' => '15',
383 'left' => 0,
384 ],
385 'layout_type' => 'modern',
386 'title_color' => '#1a1a1a',
387 'text_color' => '#1a1a1a',
388 'font_family' => '"Rethink Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
389 'title' => '<p style="text-align: center"><span style="font-size: 20px;font-weight: 600">Shipping Address</span></p>',
390 'shipping_content_alignment' => 'center',
391 'shipping_content_text_format' => [
392 'bold' => false,
393 'italic' => false,
394 'underline' => false,
395 ],
396 ]
397 ),
398 ],
399 'border' => [
400 'side' => 'custom',
401 'width' => '1',
402 'style' => 'solid',
403 'color' => '#1a1a1a',
404 'custom' => [
405 'top' => '1',
406 'right' => 0,
407 'bottom' => '1',
408 'left' => '1',
409 ],
410 ],
411 ]
412 ),
413 Column::get_object_data(
414 50,
415 [
416 'children' => [
417 BillingAddress::get_object_data(
418 [
419 'padding' => [
420 'top' => 25,
421 'right' => '50',
422 'bottom' => '15',
423 'left' => '50',
424 ],
425 'layout_type' => 'modern',
426 'title_color' => '#1a1a1a',
427 'text_color' => '#1a1a1a',
428 'font_family' => '"Rethink Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
429 'title' => '<p style="text-align: center"><span style="font-size: 20px;font-weight: 600">Billing Address</span></p>',
430 'billing_content_alignment' => 'center',
431 'billing_content_text_format' => [
432 'bold' => false,
433 'italic' => false,
434 'underline' => false,
435 ],
436 ]
437 ),
438 ],
439 'border' => [
440 'side' => 'all',
441 'width' => '1',
442 'style' => 'solid',
443 'color' => '#1a1a1a',
444 'custom' => [
445 'top' => '1',
446 'right' => '1',
447 'bottom' => '1',
448 'left' => '1',
449 ],
450 ],
451 ]
452 ),
453 ],
454 'column_spacing' => 0,
455 'padding' => [
456 'top' => 25,
457 'right' => 50,
458 'bottom' => 25,
459 'left' => 50,
460 ],
461 'inner_background_color' => '#ffffff',
462 ]
463 ),
464 ColumnLayout::get_object_data(
465 1,
466 [
467 'children' => [
468 Column::get_object_data(
469 100,
470 [
471 'children' => [
472 Text::get_object_data(
473 [
474 'padding' => [
475 'top' => '0',
476 'right' => '0',
477 'bottom' => '0',
478 'left' => '0',
479 ],
480 'background_color' => '#fafafa',
481 'font_family' => '"Rethink Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
482 'text_color' => '#1a1a1a',
483 'rich_text' => '<p style="text-align: center"><span style="font-size: 16px;font-weight: 400">For questions, contact <u>hi@yourwoostore.com</u>, visit our <u>FAQs</u>, or <u>chat</u> with us during operating hours for account support</span></p>',
484 ]
485 ),
486 SocialIcon::get_object_data(
487 [
488 'padding' => [
489 'top' => '20',
490 'right' => '0',
491 'bottom' => '12',
492 'left' => '0',
493 ],
494 'background_color' => '#fafafa',
495 'width_icon' => '32',
496 'spacing' => '12',
497 'icon_list' => [
498 [
499 'icon' => 'facebook',
500 'url' => '#',
501 ],
502 [
503 'icon' => 'instagram',
504 'url' => '#',
505 ],
506 [
507 'icon' => 'tiktok',
508 'url' => '#',
509 ],
510 [
511 'icon' => 'youtube',
512 'url' => '#',
513 ],
514 ],
515 ]
516 ),
517 Text::get_object_data(
518 [
519 'padding' => [
520 'top' => '0',
521 'right' => '0',
522 'bottom' => 10,
523 'left' => '0',
524 ],
525 'background_color' => '#fafafa',
526 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
527 'text_color' => '#1a1a1a',
528 'rich_text' => '<p style="text-align: center"><span style="font-size: 12px">© 2026 WooCommerce</span></p>',
529 ]
530 ),
531 ],
532 ]
533 ),
534 ],
535 'padding' => [
536 'top' => 30,
537 'right' => '50',
538 'bottom' => '20',
539 'left' => '50',
540 ],
541 'background_color' => '#fafafa',
542 ]
543 ),
544 ];
545 }
546
547 private static function with_margin( array $element, array $margin ): array {
548 $element['data']['margin'] = $margin;
549
550 return $element;
551 }
552 }
553