PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.1
YayMail – WooCommerce Email Customizer v4.4.1
4.4.6 4.4.5 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 All 57 releases
yaymail / src / TemplateLibrary / Templates / CancelledOrder / Classic.php

Classic.php in YayMail – WooCommerce Email Customizer 4.4.1, at src/TemplateLibrary/Templates/CancelledOrder/Classic.php

298 lines 14.5 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\CancelledOrder;
4
5 use YayMail\Abstracts\BaseTemplate;
6 use YayMail\Elements\BillingShippingAddress;
7 use YayMail\Elements\Footer;
8 use YayMail\Elements\Heading;
9 use YayMail\Elements\Logo;
10 use YayMail\Elements\OrderDetails;
11 use YayMail\Elements\Text;
12 use YayMail\Utils\SingletonTrait;
13
14 /**
15 * Classic template for Admin Cancelled Order email.
16 */
17 class Classic extends BaseTemplate {
18 use SingletonTrait;
19
20 public function __construct() {
21 parent::__construct();
22 $this->id = 'cancelled_order_classic';
23 $this->email_type = 'cancelled_order';
24 $this->name = 'Classic';
25 $this->description = 'Clean layout with plenty of whitespace';
26 $this->elements = [
27 Logo::get_object_data(
28 [
29 'container_group_definition' => [
30 'component' => 'GroupDefinition',
31 'title' => 'Container settings',
32 'description' => 'Handle container layout settings',
33 ],
34 'padding' => [
35 'top' => '15',
36 'right' => '50',
37 'bottom' => '15',
38 'left' => '50',
39 ],
40 'background_color' => '#f9f9f9',
41 'logo_breaker' => [
42 'component' => 'LineBreaker',
43 ],
44 'logo_group_definition' => [
45 'component' => 'GroupDefinition',
46 'title' => 'Logo settings',
47 'description' => 'Handle logo settings',
48 ],
49 'src' => 'http://localhost:8080/wp-content/plugins/yaymail/assets/images/woocommerce-logo.png',
50 'align' => 'center',
51 'width' => '172',
52 'url' => '#',
53 'alt' => '',
54 ]
55 ),
56 Heading::get_object_data(
57 [
58 'container_group_definition' => [
59 'component' => 'GroupDefinition',
60 'title' => 'Container settings',
61 'description' => 'Handle container layout settings',
62 ],
63 'padding' => [
64 'top' => '40',
65 'right' => '50',
66 'bottom' => '40',
67 'left' => '50',
68 ],
69 'background_color' => '#873EFF',
70 'content_breaker' => [
71 'component' => 'LineBreaker',
72 ],
73 'content_group_definition' => [
74 'component' => 'GroupDefinition',
75 'title' => 'Content settings',
76 'description' => 'Handle content settings',
77 ],
78 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
79 'text_color' => '#ffffff',
80 'rich_text' => '<h1 style="font-size:30px;font-weight:300;line-height:normal;margin:0px;color:inherit">Order Cancelled: #[yaymail_order_number is_plain="true"]</h1>',
81 ]
82 ),
83 Text::get_object_data(
84 [
85 'container_group_definition' => [
86 'component' => 'GroupDefinition',
87 'title' => 'Container settings',
88 'description' => 'Handle container layout settings',
89 ],
90 'padding' => [
91 'top' => '15',
92 'right' => '50',
93 'bottom' => '15',
94 'left' => '50',
95 ],
96 'background_color' => '#fff',
97 'border' => [
98 'side' => 'none',
99 'width' => '1',
100 'style' => 'solid',
101 'color' => '#e5e5e5',
102 'custom' => [
103 'top' => '1',
104 'right' => '1',
105 'bottom' => '1',
106 'left' => '1',
107 ],
108 ],
109 'content_breaker' => [
110 'component' => 'LineBreaker',
111 ],
112 'content_group_definition' => [
113 'component' => 'GroupDefinition',
114 'title' => 'Content settings',
115 'description' => 'Handle content settings',
116 ],
117 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
118 'text_color' => '#636363',
119 'rich_text' => '<p><span>Notification to let you know &mdash; order #[yaymail_order_number is_plain="true"] belonging to [yaymail_billing_first_name] [yaymail_billing_last_name] has been cancelled:</span></p>',
120 ]
121 ),
122 OrderDetails::get_object_data(
123 [
124 'rich_text' => '[yaymail_order_details]',
125 'payment_instructions' => '[yaymail_payment_instructions]',
126 'container_group_definition' => [
127 'component' => 'GroupDefinition',
128 'title' => 'Container settings',
129 'description' => 'Handle container layout settings',
130 ],
131 'padding' => [
132 'top' => '15',
133 'right' => '50',
134 'bottom' => '15',
135 'left' => '50',
136 ],
137 'background_color' => '#fff',
138 'border' => [
139 'side' => 'none',
140 'width' => '1',
141 'style' => 'solid',
142 'color' => '#e5e5e5',
143 'custom' => [
144 'top' => '1',
145 'right' => '1',
146 'bottom' => '1',
147 'left' => '1',
148 ],
149 ],
150 'table_setting_breaker' => [
151 'component' => 'LineBreaker',
152 ],
153 'table_group_definition' => [
154 'component' => 'GroupDefinition',
155 'title' => 'Table settings',
156 'description' => 'Handle table settings',
157 ],
158 'layout_type' => 'modern',
159 'title' => '<span style="font-size: 20px">Order #[yaymail_order_number] <b>([yaymail_order_date])</b></span>',
160 'title_color' => '#873EFF',
161 'text_color' => '#636363',
162 'border_color' => '#e5e5e5',
163 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
164 'table_content_font_size' => '14',
165 'table_heading_line_breaker' => [
166 'component' => 'LineBreaker',
167 ],
168 'table_heading_group_definition' => [
169 'component' => 'GroupDefinition',
170 'title' => 'Table heading settings',
171 'description' => 'Handle table heading settings',
172 ],
173 'table_heading_font_size' => '14',
174 'show_table_header' => 1,
175 'product_title' => 'Product',
176 'cost_title' => 'Cost',
177 'quantity_title' => 'Quantity',
178 'price_title' => 'Price',
179 'cart_subtotal_title' => 'Subtotal:',
180 'payment_method_title' => 'Payment method:',
181 'order_total_title' => 'Total:',
182 'order_note_title' => 'Note:',
183 'shipping_title' => 'Shipping: [yaymail_shipping_method]',
184 'discount_title' => 'Discount:',
185 'custom_footer_rows_breaker' => [
186 'component' => 'LineBreaker',
187 ],
188 'custom_footer_rows_group' => [
189 'component' => 'GroupDefinition',
190 'title' => 'Custom Footer Rows',
191 'description' => 'Add custom rows to the order totals footer',
192 ],
193 'custom_footer_rows' => [],
194 ]
195 ),
196 BillingShippingAddress::get_object_data(
197 [
198 'container_group_definition' => [
199 'component' => 'GroupDefinition',
200 'title' => 'Container settings',
201 'description' => 'Handle container layout settings',
202 ],
203 'padding' => [
204 'top' => '15',
205 'right' => '50',
206 'bottom' => '15',
207 'left' => '50',
208 ],
209 'background_color' => '#fff',
210 'content_breaker' => [
211 'component' => 'LineBreaker',
212 ],
213 'content_group_definition' => [
214 'component' => 'GroupDefinition',
215 'title' => 'Content settings',
216 'description' => 'Handle content settings',
217 ],
218 'layout_type' => 'modern',
219 'title_color' => '#873EFF',
220 'text_color' => '#636363',
221 'border_color' => '#e5e5e5',
222 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
223 'billing_title' => '<span style="font-size: 20px;font-weight:600;">Billing Address</span>',
224 'shipping_title' => '<span style="font-size: 20px;font-weight:600;">Shipping Address</span>',
225 'shipping_address_content' => '[yaymail_shipping_address]',
226 'billing_address_content' => '[yaymail_billing_address]',
227 ]
228 ),
229 Text::get_object_data(
230 [
231 'container_group_definition' => [
232 'component' => 'GroupDefinition',
233 'title' => 'Container settings',
234 'description' => 'Handle container layout settings',
235 ],
236 'padding' => [
237 'top' => '0',
238 'right' => '50',
239 'bottom' => '38',
240 'left' => '50',
241 ],
242 'background_color' => '#fff',
243 'border' => [
244 'side' => 'none',
245 'width' => '1',
246 'style' => 'solid',
247 'color' => '#e5e5e5',
248 'custom' => [
249 'top' => '1',
250 'right' => '1',
251 'bottom' => '1',
252 'left' => '1',
253 ],
254 ],
255 'content_breaker' => [
256 'component' => 'LineBreaker',
257 ],
258 'content_group_definition' => [
259 'component' => 'GroupDefinition',
260 'title' => 'Content settings',
261 'description' => 'Handle content settings',
262 ],
263 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
264 'text_color' => '#636363',
265 'rich_text' => '<p><span>Thanks for reading.</span></p>',
266 ]
267 ),
268 Footer::get_object_data(
269 [
270 'container_group_definition' => [
271 'component' => 'GroupDefinition',
272 'title' => 'Container settings',
273 'description' => 'Handle container layout settings',
274 ],
275 'padding' => [
276 'top' => '15',
277 'right' => '50',
278 'bottom' => '15',
279 'left' => '50',
280 ],
281 'background_color' => '#f9f9f9',
282 'content_breaker' => [
283 'component' => 'LineBreaker',
284 ],
285 'content_group_definition' => [
286 'component' => 'GroupDefinition',
287 'title' => 'Content settings',
288 'description' => 'Handle content settings',
289 ],
290 'text_color' => '#8a8a8a',
291 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
292 'rich_text' => '<p style="font-size: 14px;margin: 0px 0px 16px;text-align: center">[yaymail_site_name]&nbsp;- Built with <a style="font-weight: normal;text-decoration: underline" href="https://woocommerce.com" target="_blank" rel="noopener">WooCommerce</a></p>',
293 ]
294 ),
295 ];
296 }
297 }
298