PluginProbe
YayMail – WooCommerce Email Customizer / 4.3.4
YayMail – WooCommerce Email Customizer v4.3.4
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 / TemplatePatterns / Patterns / Offer4.php

Offer4.php in YayMail – WooCommerce Email Customizer 4.3.4, at src/TemplatePatterns/Patterns/Offer4.php

108 lines 4.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace YayMail\TemplatePatterns\Patterns;
3
4 use YayMail\Abstracts\BasePattern;
5 use YayMail\Elements\Button;
6 use YayMail\Elements\Column;
7 use YayMail\Elements\ColumnLayout;
8 use YayMail\Elements\Image;
9 use YayMail\Elements\Text;
10 use YayMail\TemplatePatterns\SectionTemplates\Offer;
11 use YayMail\Utils\SingletonTrait;
12
13 /** */
14 class Offer4 extends BasePattern {
15 use SingletonTrait;
16
17 public const TYPE = 'offer_4';
18
19 public function __construct() {
20 $this->id = uniqid();
21 $this->section = Offer::TYPE;
22 $this->position = 13;
23 $this->name = __( 'Offer 4', 'yaymail' );
24 $this->elements = [
25 ColumnLayout::get_object_data(
26 2,
27 [
28 'inner_background_color' => '#ffffff00',
29 'border_radius' => [
30 'top_left' => 20,
31 'top_right' => 20,
32 'bottom_right' => 20,
33 'bottom_left' => 20,
34 ],
35 'padding' => [
36 'top' => 25,
37 'bottom' => 25,
38 'right' => 40,
39 'left' => 40,
40 ],
41 'background_image' => [
42 'url' => 'https://images.wpbrandy.com/uploads/yaymail-offer-4-bg.png',
43 'position' => 'center_center',
44 'repeat' => 'no-repeat',
45 'size' => 'cover',
46 'custom_size' => 92,
47 ],
48 'children' => [
49 Column::get_object_data(
50 68,
51 [
52 'children' => [
53 Text::get_object_data(
54 [
55 'background_color' => '#ffffff00',
56 'text_color' => '#FFFFFF',
57 'rich_text' => '<p style="text-align: left; margin: 0;"><span style="font-size: 24px; font-weight: bold;">Enjoy Up to 50% Off!</span></p>',
58 'padding' => [
59 'top' => 10,
60 'bottom' => 0,
61 'right' => 30,
62 'left' => 0,
63 ],
64 ]
65 ),
66 Text::get_object_data(
67 [
68 'background_color' => '#ffffff00',
69 'text_color' => '#FFFFFF',
70 'rich_text' => '<p style="text-align: left; margin: 0;"><span style="font-size: 12px; font-weight: 400;">Copy and paste the promo code during checkout to enjoy exclusive discounts on your purchase</span></p>',
71 'padding' => [
72 'top' => 5,
73 'bottom' => 0,
74 'right' => 30,
75 'left' => 0,
76 ],
77 ]
78 ),
79 ],
80 ]
81 ),
82 Column::get_object_data(
83 32,
84 [
85 'children' => [
86 Text::get_object_data(
87 [
88 'background_color' => '#ffffff00',
89 'text_color' => '#FFFFFF',
90 'rich_text' => '<p style="border: 1px dashed #ffffff80; border-radius: 10px; font-size: 15; font-weight: 600; text-align: center; width: fit-content; padding: 10px 15px; letter-spacing: 3px;">COUPON50F</p>',
91 'padding' => [
92 'top' => 25,
93 'bottom' => 25,
94 'right' => 0,
95 'left' => 5,
96 ],
97 ]
98 ),
99 ],
100 ]
101 ),
102 ],
103 ]
104 ),
105 ];
106 }
107 }
108