PluginProbe
YayMail – WooCommerce Email Customizer / 1.9.6
YayMail – WooCommerce Email Customizer v1.9.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 / includes / Templates / DefaultTemplate / CustomerOnHoldOrder.php

CustomerOnHoldOrder.php in YayMail – WooCommerce Email Customizer 1.9.6, at includes/Templates/DefaultTemplate/CustomerOnHoldOrder.php

292 lines 14.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace YayMail\Templates\DefaultTemplate;
3
4 defined( 'ABSPATH' ) || exit;
5
6 class CustomerOnHoldOrder {
7
8 protected static $instance = null;
9
10 public static function getInstance() {
11 if ( null == self::$instance ) {
12 self::$instance = new self();
13 }
14
15 return self::$instance;
16 }
17
18 public static function getTemplates() {
19 /*
20 @@@ Html default send email.
21 @@@ Note: Add characters '\' before special characters in a string.
22 @@@ Example: font-family: \'Helvetica Neue\'...
23 */
24 $emailTitle = __( 'Thank you for your order', 'woocommerce' );
25 $emailHi = esc_html__( 'Hi ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_billing_first_name]' ) . ',' );
26 $emailtext = esc_html__( 'Thanks for your order. It\'s on-hold until we confirm that payment has been received. In the meantime, here\'s a reminder of what you ordered:', 'woocommerce' );
27 $additionalContent = __( 'We look forward to fulfilling your order soon.', 'woocommerce' );
28 $textShippingAddress = __( 'Shipping Address', 'woocommerce' );
29 $textBillingAddress = __( 'Billing Address', 'woocommerce' );
30
31 // Html
32 $html = '<html>
33 <head>
34 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
35 </head>
36
37 <body style="background: rgb(236, 236, 236); padding: 0;">
38 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="web8ffa62b5-7258-42cc-ba53-7ae69638c1fe" class="web-main-row" style="display: table; background-color: rgb(236, 236, 236); width: 605px;">
39 <tbody>
40 <tr>
41 <td id="web8ffa62b5-7258-42cc-ba53-7ae69638c1fe-img" align="center" class="web-img-wrap" style="word-break: break-word; padding: 15px 50px;">
42 <a href="#" target="_blank" style="border: none; text-decoration: none;"><img border="0" tabindex="0" src="' . YAYMAIL_PLUGIN_URL . 'assets/dist/images/woocommerce-logo.png" class="web-img" width="172" height="auto"></a>
43 </td>
44 </tr>
45 </tbody>
46 </table>
47 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="web802bfe24-7af8-48af-ac5e-6560a81345b3" class="web-main-row" style="display: table; background-color: #96588a; width: 605px;">
48 <tbody>
49 <tr>
50 <td id="web802bfe24-7af8-48af-ac5e-6560a81345b3-shipping-address" align="left" class="web-shipping-address" style="font-size: 13px; line-height: 22px; word-break: break-word; font-family: Helvetica, Roboto, Arial, sans-serif; padding: 36px 48px;">
51 <div>
52 <h1 style="font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: #fff;">' . $emailTitle . '</h1></div>
53 </td>
54 </tr>
55 </tbody>
56 </table>
57 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="webb035d1f1-0cfe-41c5-b79c-0478f144ef5f" class="web-main-row" style="display: table; background-color: rgb(255, 255, 255); width: 605px;">
58 <tbody>
59 <tr>
60 <td id="webb035d1f1-0cfe-41c5-b79c-0478f144ef5f-shipping-address" align="left" class="web-shipping-address" style="font-size: 13px; line-height: 22px; word-break: break-word; font-family: Helvetica, Roboto, Arial, sans-serif; padding: 47px 50px 0px;">
61 <div>
62 <p style="margin: 0 0 16px;"><span style="color: #636363; font-size: 14px;">' . $emailHi . '</span></p>
63 <p style="margin: 0 0 16px;"><span style="color: #636363; font-size: 14px;">' . $emailtext . '</span></p>
64 </div>
65 </td>
66 </tr>
67 </tbody>
68 </table>
69 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="webad422370-f762-4a26-92de-c4cf3821b8eb" class="web-main-row" style="display: table; background-color: rgb(255, 255, 255); width: 605px;">
70 <tbody>
71 <tr>
72 <td id="web-ad422370-f762-4a26-92de-c4cf3821b8eb-order-item" align="left" class="web-order-item" style="font-size: 13px; line-height: 22px; word-break: break-word; font-family: Helvetica, Roboto, Arial, sans-serif; padding: 2px 50px 15px;">
73 <div class="yaymail_items_border_default" style="color: rgb(99, 99, 99);border-color: #e5e5e5;">
74 <p></p>
75 [yaymail_items_border]
76 <p></p>
77 </div>
78 </td>
79 </tr>
80 </tbody>
81 </table>';
82 if ( class_exists( 'WC_Subscription' ) ) {
83 $html .= '<table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="weso422370-f762-4a26-92de-c4cf3821b8eb" class="web-main-row" style="display: table; background-color: rgb(255, 255, 255); width: 605px;">
84 <tbody>
85 <tr>
86 <td id="web-so422370-f762-4a26-92de-c4cf3821b8eb-order-item" align="left" class="web-order-item" style="font-size: 13px; line-height: 22px; word-break: break-word; font-family: Helvetica, Roboto, Arial, sans-serif; padding: 15px 50px;">
87 <div style="color: rgb(99, 99, 99);border-color: #e5e5e5;">
88 <p></p>
89 [yaymail_items_subscription_information]
90 <p></p>
91 </div>
92 </td>
93 </tr>
94 </tbody>
95 </table>';
96 }
97 $html .= '<table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="webcd546d92-1791-4dcc-8d35-0ea4f20718eb" class="web-main-row" style="display: table; background-color: rgb(255, 255, 255); width: 605px;">
98 <tbody>
99 <tr>
100 <td id="web-cd546d92-1791-4dcc-8d35-0ea4f20718eb-billing-address" align="left" class="web-billing-address" style="font-size: 13px; line-height: 22px; word-break: break-word; font-family: Helvetica, Roboto, Arial, sans-serif; padding: 12px 50px 15px;">
101 <div style="color: rgb(99, 99, 99);">
102 <p>
103 [yaymail_billing_shipping_address]
104 </p>
105 </div>
106 </td>
107 </tr>
108 </tbody>
109 </table>
110 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="webb39bf2e6-8c1a-4384-a5ec-37663da27c8d" class="web-main-row" style="display: table; background-color: rgb(255, 255, 255); width: 605px;">
111 <tbody>
112 <tr>
113 <td id="webb39bf2e6-8c1a-4384-a5ec-37663da27c8d-shipping-address" align="left" class="web-shipping-address" style="font-size: 13px; line-height: 22px; word-break: break-word; font-family: Helvetica, Roboto, Arial, sans-serif; padding-bottom: 38px; padding-right: 50px; padding-left: 50px;">
114 <div>
115 <p><span style="font-size: 14px; color: #636363;">' . $additionalContent . '</span></p>
116 </div>
117 </td>
118 </tr>
119 </tbody>
120 </table>
121 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="webea509383-1c35-4ab6-8169-dae1807f847b" class="web-main-row" style="display: table; background-color: rgb(236, 236, 236); width: 605px;">
122 <tbody>
123 <tr>
124 <td id="webea509383-1c35-4ab6-8169-dae1807f847b-shipping-address" align="left" class="web-shipping-address" style="font-size: 13px; line-height: 22px; word-break: break-word; font-family: Verdana, Geneva, sans-serif; padding: 15px 50px;">
125 <div>
126 <p style="font-size: 14px; color: #8a8a8a; margin: 0px 0px 16px; text-align: center;">[yaymail_site_name] - Built with <a style="color: #96588a; font-weight: normal; text-decoration: underline;" href="https://woocommerce.com" target="_blank" rel="noopener" draggable="false">WooCommerce</a></p>
127 </div>
128 </td>
129 </tr>
130 </tbody>
131 </table>
132 </body>
133 </html>';
134
135 /*
136 @@@ Elements default when reset template.
137 @@@ Note 1: Add characters '\' before special characters in a string.
138 @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif",
139
140 @@@ Note 2: Add characters '\' before special characters in a string.
141 @@@ example 2: "<h1 style=\"font-family: \'Helvetica Neue\',...."
142 */
143
144 // Elements
145 $elements =
146 '[{
147 "id": "8ffa62b5-7258-42cc-ba53-7ae69638c1fe",
148 "type": "Logo",
149 "nameElement": "Logo",
150 "settingRow": {
151 "backgroundColor": "#ECECEC",
152 "align": "center",
153 "pathImg": "",
154 "paddingTop": "15",
155 "paddingRight": "50",
156 "paddingBottom": "15",
157 "paddingLeft": "50",
158 "width": "172",
159 "url": "#"
160 }
161 }, {
162 "id": "802bfe24-7af8-48af-ac5e-6560a81345b3",
163 "type": "ElementText",
164 "nameElement": "Email Heading",
165 "settingRow": {
166 "content": "<h1 style=\"font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: inherit;\">' . $emailTitle . '</h1>",
167 "backgroundColor": "#96588A",
168 "textColor": "#ffffff",
169 "family": "Helvetica,Roboto,Arial,sans-serif",
170 "paddingTop": "36",
171 "paddingRight": "48",
172 "paddingBottom": "36",
173 "paddingLeft": "48"
174 }
175 }, {
176 "id": "b035d1f1-0cfe-41c5-b79c-0478f144ef5f",
177 "type": "ElementText",
178 "nameElement": "Text",
179 "settingRow": {
180 "content": "<p style=\"margin: 0px;\"><span style=\"font-size: 14px;\">' . $emailHi . '<br /><br /></span></p>\n<p style=\"margin: 0px;\"><span style=\"font-size: 14px;\">' . $emailtext . '</span></p>",
181 "backgroundColor": "#fff",
182 "textColor": "#636363",
183 "family": "Helvetica,Roboto,Arial,sans-serif",
184 "paddingTop": "47",
185 "paddingRight": "50",
186 "paddingBottom": "0",
187 "paddingLeft": "50"
188 }
189 },
190 {
191 "id": "ad422370-f762-4a26-92de-c4cf3878h0oi",
192 "type": "OrderItem",
193 "nameElement": "Order Item",
194 "settingRow": {
195 "contentBefore": "[yaymail_items_border_before]",
196 "contentAfter": "[yaymail_items_border_after]",
197 "contentTitle": "[yaymail_items_border_title]",
198 "content": "[yaymail_items_border_content]",
199 "backgroundColor": "#fff",
200 "titleColor" : "#96588a",
201 "textColor": "#636363",
202 "borderColor": "#e5e5e5",
203 "family": "Helvetica,Roboto,Arial,sans-serif",
204 "paddingTop": "15",
205 "paddingRight": "50",
206 "paddingBottom": "15",
207 "paddingLeft": "50"
208 }
209 },';
210 if ( class_exists( 'WC_Subscription' ) ) {
211 $elements .= '{
212 "id": "os422370-f762-4a26-92de-c4cf3878h0oi",
213 "type": "OrderSubscription",
214 "nameElement": "Order Subscription",
215 "settingRow": {
216 "content" : "[yaymail_items_subscription_information]",
217 "backgroundColor" : "#fff",
218 "titleColor" : "#96588a",
219 "textColor" : "#636363",
220 "borderColor" : "#e5e5e5",
221 "family" : "Helvetica,Roboto,Arial,sans-serif",
222 "paddingTop" : "15",
223 "paddingRight" : "50",
224 "paddingBottom" : "15",
225 "paddingLeft" : "50"
226 }
227 },';
228 }
229 $elements .= '{
230 "id": "de242956-a617-4213-9107-138842oi4tch",
231 "type": "BillingAddress",
232 "nameElement": "Billing Shipping Address",
233 "settingRow": {
234 "nameColumn": "BillingShippingAddress",
235 "contentTitle": "[yaymail_billing_shipping_address_title]",
236 "checkBillingShipping": "[yaymail_billing_shipping_address_title]",
237 "titleBilling": "' . $textBillingAddress . '",
238 "titleShipping": "' . $textShippingAddress . '",
239 "content": "[yaymail_billing_shipping_address_content]",
240 "titleColor" : "#96588a",
241 "backgroundColor": "#fff",
242 "borderColor": "#e5e5e5",
243 "textColor": "#636363",
244 "family": "Helvetica,Roboto,Arial,sans-serif",
245 "paddingTop": "15",
246 "paddingRight": "50",
247 "paddingBottom": "15",
248 "paddingLeft": "50"
249 }
250 },
251 {
252 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8d",
253 "type": "ElementText",
254 "nameElement": "Footer",
255 "settingRow": {
256 "content": "<p><span style=\"font-size: 14px;\">' . $additionalContent . '</span></p>",
257 "backgroundColor": "#fff",
258 "textColor": "#636363",
259 "family": "Helvetica,Roboto,Arial,sans-serif",
260 "paddingTop": "",
261 "paddingRight": "50",
262 "paddingBottom": "38",
263 "paddingLeft": "50"
264 }
265 },
266 {
267 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds",
268 "type": "ElementText",
269 "nameElement": "Footer",
270 "settingRow": {
271 "content": "<p style=\"font-size: 14px;margin: 0px 0px 16px; text-align: center;\">[yaymail_site_name]&nbsp;- Built with <a style=\"color: #96588a; font-weight: normal; text-decoration: underline;\" href=\"https://woocommerce.com\" target=\"_blank\" rel=\"noopener\">WooCommerce</a></p>",
272 "backgroundColor": "#ececec",
273 "textColor": "#8a8a8a",
274 "family": "Helvetica,Roboto,Arial,sans-serif",
275 "paddingTop": "15",
276 "paddingRight": "50",
277 "paddingBottom": "15",
278 "paddingLeft": "50"
279 }
280 }]';
281
282 // Templates New Order
283 $templates = array(
284 'customer_on_hold_order' => array(),
285 );
286
287 $templates['customer_on_hold_order']['html'] = $html;
288 $templates['customer_on_hold_order']['elements'] = $elements;
289 return $templates;
290 }
291 }
292