PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.6
YayMail – WooCommerce Email Customizer v4.4.6
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 / CustomerFailedOrder / Modern.php

Modern.php in YayMail – WooCommerce Email Customizer 4.4.6, at src/TemplateLibrary/Templates/CustomerFailedOrder/Modern.php

336 lines 16.4 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\CustomerFailedOrder;
4
5 use YayMail\Abstracts\BaseTemplate;
6 use YayMail\Elements\BillingShippingAddress;
7 use YayMail\Elements\Divider;
8 use YayMail\Elements\Footer;
9 use YayMail\Elements\Heading;
10 use YayMail\Elements\OrderDetails;
11 use YayMail\Elements\Text;
12 use YayMail\Utils\SingletonTrait;
13
14 /**
15 * Modern template for Failed Order (Customer) email.
16 */
17 class Modern extends BaseTemplate {
18 use SingletonTrait;
19
20 public function __construct() {
21 parent::__construct();
22 $this->id = 'customer_failed_order_modern';
23 $this->email_type = 'customer_failed_order';
24 $this->name = 'Modern';
25 $this->description = 'Clean layout with plenty of whitespace';
26 $this->elements = [
27 Text::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' => 20,
36 'right' => '50',
37 'bottom' => 0,
38 'left' => '50',
39 ],
40 'background_color' => '#fff',
41 'border' => [
42 'side' => 'none',
43 'width' => '1',
44 'style' => 'solid',
45 'color' => '#e5e5e5',
46 'custom' => [
47 'top' => '1',
48 'right' => '1',
49 'bottom' => '1',
50 'left' => '1',
51 ],
52 ],
53 'content_breaker' => [
54 'component' => 'LineBreaker',
55 ],
56 'content_group_definition' => [
57 'component' => 'GroupDefinition',
58 'title' => 'Content settings',
59 'description' => 'Handle content settings',
60 ],
61 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
62 'text_color' => '#720eec',
63 'rich_text' => '<p><span style="font-size: 16px">[yaymail_site_name]</span></p>',
64 ]
65 ),
66 Heading::get_object_data(
67 [
68 'container_group_definition' => [
69 'component' => 'GroupDefinition',
70 'title' => 'Container settings',
71 'description' => 'Handle container layout settings',
72 ],
73 'padding' => [
74 'top' => '15',
75 'right' => '50',
76 'bottom' => '15',
77 'left' => '50',
78 ],
79 'background_color' => '#fff',
80 'border' => [
81 'side' => 'none',
82 'width' => '1',
83 'style' => 'solid',
84 'color' => '#e5e5e5',
85 'custom' => [
86 'top' => '1',
87 'right' => '1',
88 'bottom' => '1',
89 'left' => '1',
90 ],
91 ],
92 'content_breaker' => [
93 'component' => 'LineBreaker',
94 ],
95 'content_group_definition' => [
96 'component' => 'GroupDefinition',
97 'title' => 'Content settings',
98 'description' => 'Handle content settings',
99 ],
100 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
101 'text_color' => '#3c3c3c',
102 'rich_text' => '<p><span style="font-size: 30px"><strong>Sorry, your order was unsuccessful</strong></span></p>',
103 ]
104 ),
105 Text::get_object_data(
106 [
107 'container_group_definition' => [
108 'component' => 'GroupDefinition',
109 'title' => 'Container settings',
110 'description' => 'Handle container layout settings',
111 ],
112 'padding' => [
113 'top' => 0,
114 'right' => '50',
115 'bottom' => 15,
116 'left' => '50',
117 ],
118 'background_color' => '#fff',
119 'border' => [
120 'side' => 'none',
121 'width' => '1',
122 'style' => 'solid',
123 'color' => '#e5e5e5',
124 'custom' => [
125 'top' => '1',
126 'right' => '1',
127 'bottom' => '1',
128 'left' => '1',
129 ],
130 ],
131 'content_breaker' => [
132 'component' => 'LineBreaker',
133 ],
134 'content_group_definition' => [
135 'component' => 'GroupDefinition',
136 'title' => 'Content settings',
137 'description' => 'Handle content settings',
138 ],
139 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
140 'text_color' => '#636363',
141 'rich_text' => '<p><span style="font-size: 16px">Hi [yaymail_billing_first_name]</span></p><br/><p><span style="font-size: 16px">Unfortunately, we couldn\'t complete your order due to an issue with your payment method.</span></p><br/><p><span style="font-size: 16px">If you\'d like to continue with your purchase, please return to [yaymail_site_name] and try a different method of payment.</span></p><br/><p><span style="font-size: 16px">Your order details are as follows:</span></p>',
142 ]
143 ),
144 OrderDetails::get_object_data(
145 [
146 'rich_text' => '[yaymail_order_details]',
147 'payment_instructions' => '[yaymail_payment_instructions]',
148 'container_group_definition' => [
149 'component' => 'GroupDefinition',
150 'title' => 'Container settings',
151 'description' => 'Handle container layout settings',
152 ],
153 'padding' => [
154 'top' => '15',
155 'right' => '50',
156 'bottom' => '15',
157 'left' => '50',
158 ],
159 'background_color' => '#fff',
160 'border' => [
161 'side' => 'none',
162 'width' => '1',
163 'style' => 'solid',
164 'color' => '#e5e5e5',
165 'custom' => [
166 'top' => '1',
167 'right' => '1',
168 'bottom' => '1',
169 'left' => '1',
170 ],
171 ],
172 'table_setting_breaker' => [
173 'component' => 'LineBreaker',
174 ],
175 'table_group_definition' => [
176 'component' => 'GroupDefinition',
177 'title' => 'Table settings',
178 'description' => 'Handle table settings',
179 ],
180 'layout_type' => 'modern',
181 'title' => '<p><strong><span style="font-size: 20px">Order summary</span></strong></p><p><span style="font-size: 14px">Order #[yaymail_order_number] ([yaymail_order_date])</span></p>',
182 'title_color' => '#3c3c3c',
183 'text_color' => '#636363',
184 'border_color' => '#e5e5e5',
185 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
186 'table_content_font_size' => '16',
187 'table_heading_line_breaker' => [
188 'component' => 'LineBreaker',
189 ],
190 'table_heading_group_definition' => [
191 'component' => 'GroupDefinition',
192 'title' => 'Table heading settings',
193 'description' => 'Handle table heading settings',
194 ],
195 'table_heading_font_size' => '16',
196 'show_table_header' => 1,
197 'product_title' => 'Product',
198 'cost_title' => 'Cost',
199 'quantity_title' => 'Quantity',
200 'price_title' => 'Price',
201 'cart_subtotal_title' => 'Subtotal:',
202 'payment_method_title' => 'Payment method:',
203 'order_total_title' => 'Total:',
204 'order_note_title' => 'Note:',
205 'shipping_title' => 'Shipping: [yaymail_shipping_method]',
206 'discount_title' => 'Discount:',
207 'custom_footer_rows_breaker' => [
208 'component' => 'LineBreaker',
209 ],
210 'custom_footer_rows_group' => [
211 'component' => 'GroupDefinition',
212 'title' => 'Custom Footer Rows',
213 'description' => 'Add custom rows to the order totals footer',
214 ],
215 'custom_footer_rows' => [],
216 ]
217 ),
218 BillingShippingAddress::get_object_data(
219 [
220 'container_group_definition' => [
221 'component' => 'GroupDefinition',
222 'title' => 'Container settings',
223 'description' => 'Handle container layout settings',
224 ],
225 'padding' => [
226 'top' => '15',
227 'right' => '50',
228 'bottom' => '15',
229 'left' => '50',
230 ],
231 'background_color' => '#fff',
232 'content_breaker' => [
233 'component' => 'LineBreaker',
234 ],
235 'content_group_definition' => [
236 'component' => 'GroupDefinition',
237 'title' => 'Content settings',
238 'description' => 'Handle content settings',
239 ],
240 'layout_type' => 'modern',
241 'title_color' => '#3c3c3c',
242 'text_color' => '#636363',
243 'border_color' => '#e5e5e5',
244 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
245 'billing_title' => '<p><span style="font-size: 16px; font-weight: 600;">Billing address</span></p>',
246 'shipping_title' => '<p><span style="font-size: 16px; font-weight: 600;">Shipping address</span></p>',
247 'shipping_address_content' => '[yaymail_shipping_address]',
248 'billing_address_content' => '[yaymail_billing_address]',
249 ]
250 ),
251 Text::get_object_data(
252 [
253 'container_group_definition' => [
254 'component' => 'GroupDefinition',
255 'title' => 'Container settings',
256 'description' => 'Handle container layout settings',
257 ],
258 'padding' => [
259 'top' => 15,
260 'right' => '50',
261 'bottom' => 15,
262 'left' => '50',
263 ],
264 'background_color' => '#fff',
265 'border' => [
266 'side' => 'none',
267 'width' => '1',
268 'style' => 'solid',
269 'color' => '#e5e5e5',
270 'custom' => [
271 'top' => '1',
272 'right' => '1',
273 'bottom' => '1',
274 'left' => '1',
275 ],
276 ],
277 'content_breaker' => [
278 'component' => 'LineBreaker',
279 ],
280 'content_group_definition' => [
281 'component' => 'GroupDefinition',
282 'title' => 'Content settings',
283 'description' => 'Handle content settings',
284 ],
285 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
286 'text_color' => '#636363',
287 'rich_text' => '<p style="text-align: center"><span style="font-size: 16px">If you need any help with your order, please contact us at [yaymail_store_email]</span></p>',
288 ]
289 ),
290 Divider::get_object_data(
291 [
292 'align' => 'center',
293 'padding' => [
294 'top' => '15',
295 'right' => 0,
296 'bottom' => '15',
297 'left' => 0,
298 ],
299 'width' => '100',
300 'height' => 1,
301 'background_color' => '#ffffff',
302 'divider_color' => '#00000033',
303 'divider_type' => 'solid',
304 ]
305 ),
306 Footer::get_object_data(
307 [
308 'container_group_definition' => [
309 'component' => 'GroupDefinition',
310 'title' => 'Container settings',
311 'description' => 'Handle container layout settings',
312 ],
313 'padding' => [
314 'top' => '15',
315 'right' => '50',
316 'bottom' => '15',
317 'left' => '50',
318 ],
319 'background_color' => '#ffffff',
320 'content_breaker' => [
321 'component' => 'LineBreaker',
322 ],
323 'content_group_definition' => [
324 'component' => 'GroupDefinition',
325 'title' => 'Content settings',
326 'description' => 'Handle content settings',
327 ],
328 'text_color' => '#8a8a8a',
329 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
330 '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>',
331 ]
332 ),
333 ];
334 }
335 }
336