PluginProbe
YayMail – WooCommerce Email Customizer / 3.2.2
YayMail – WooCommerce Email Customizer v3.2.2
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 / includes / Templates / DefaultTemplate / CustomerCompletedOrder.php

CustomerCompletedOrder.php in YayMail – WooCommerce Email Customizer 3.2.2, at includes/Templates/DefaultTemplate/CustomerCompletedOrder.php

212 lines 7.5 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 CustomerCompletedOrder {
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 = __( 'Thanks for shopping with us', 'woocommerce' );
25 $emailHi = esc_html__( 'Hi ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_billing_first_name]' ) . ',' );
26 $emailtext = esc_html__( 'We have finished processing your order.', 'woocommerce' );
27 $additionalContent = __( 'Thanks for shopping with us.', 'woocommerce' );
28 $textShippingAddress = __( 'Shipping Address', 'woocommerce' );
29 $textBillingAddress = __( 'Billing Address', 'woocommerce' );
30
31 /*
32 @@@ Elements default when reset template.
33 @@@ Note 1: Add characters '\' before special characters in a string.
34 @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif",
35
36 @@@ Note 2: Add characters '\' before special characters in a string.
37 @@@ example 2: "<h1 style=\"font-family: \'Helvetica Neue\',...."
38 */
39
40 // Elements
41 $elements =
42 '[{
43 "id": "8ffa62b5-7258-42cc-ba53-7ae69638c1fe",
44 "type": "Logo",
45 "nameElement": "Logo",
46 "settingRow": {
47 "backgroundColor": "#ECECEC",
48 "align": "center",
49 "pathImg": "",
50 "paddingTop": "15",
51 "paddingRight": "0",
52 "paddingBottom": "15",
53 "paddingLeft": "0",
54 "width": "172",
55 "url": "#"
56 }
57 }, {
58 "id": "802bfe24-7af8-48af-ac5e-6560a81345b3",
59 "type": "ElementText",
60 "nameElement": "Email Heading",
61 "settingRow": {
62 "content": "<h1 style=\"font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: inherit;\">' . $emailTitle . '</h1>",
63 "backgroundColor": "#7f54b3",
64 "textColor": "#ffffff",
65 "family": "Helvetica,Roboto,Arial,sans-serif",
66 "paddingTop": "36",
67 "paddingRight": "48",
68 "paddingBottom": "36",
69 "paddingLeft": "48"
70 }
71 }, {
72 "id": "b035d1f1-0cfe-41c5-b79c-0478f144ef5f",
73 "type": "ElementText",
74 "nameElement": "Text",
75 "settingRow": {
76 "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>",
77 "backgroundColor": "#fff",
78 "textColor": "#636363",
79 "family": "Helvetica,Roboto,Arial,sans-serif",
80 "paddingTop": "47",
81 "paddingRight": "50",
82 "paddingBottom": "0",
83 "paddingLeft": "50"
84 }
85 },
86 {
87 "id": "ad422370-f762-4a26-92de-c4cf3878h0oirt",
88 "type": "OrderItemDownload",
89 "nameElement": "Order Item Download",
90 "settingRow": {
91 "contentTitle": "[yaymail_items_downloadable_title]",
92 "content": "[yaymail_items_downloadable_product]",
93 "backgroundColor": "#fff",
94 "titleColor" : "#7f54b3",
95 "textColor": "#636363",
96 "borderColor": "#e5e5e5",
97 "family": "Helvetica,Roboto,Arial,sans-serif",
98 "paddingTop": "0",
99 "paddingRight": "50",
100 "paddingBottom": "0",
101 "paddingLeft": "50"
102 }
103 },
104 {
105 "id": "ad422370-f762-4a26-92de-c4cf3878h0oi",
106 "type": "OrderItem",
107 "nameElement": "Order Item",
108 "settingRow": {
109 "contentBefore": "[yaymail_items_border_before]",
110 "contentAfter": "[yaymail_items_border_after]",
111 "contentTitle": "[yaymail_items_border_title]",
112 "content": "[yaymail_items_border_content]",
113 "backgroundColor": "#fff",
114 "titleColor" : "#7f54b3",
115 "textColor": "#636363",
116 "borderColor": "#e5e5e5",
117 "family": "Helvetica,Roboto,Arial,sans-serif",
118 "paddingTop": "15",
119 "paddingRight": "50",
120 "paddingBottom": "15",
121 "paddingLeft": "50"
122 }
123 },';
124 if ( class_exists( 'WC_Subscription' ) ) {
125 $elements .= '{
126 "id": "os422370-f762-4a26-92de-c4cf3878h0oi",
127 "type": "AddonWooSubscriptionInformation",
128 "nameElement": "Woo Subscription Information",
129 "settingRow": {
130 "backgroundColor":"#fff",
131 "borderColor":"#e5e5e5",
132 "content":"This is content",
133 "contentAfter":"[yaymail_items_border_after]",
134 "contentBefore":"[yaymail_items_border_before]",
135 "contentTitle":"Subscription information",
136 "family":"Helvetica,Roboto,Arial,sans-serif",
137 "paddingBottom":"15",
138 "paddingLeft":"50",
139 "paddingRight":"50",
140 "paddingTop":"15",
141 "textColor":"#636363",
142 "titleColor":"#7f54b3",
143 "titleID": "ID",
144 "titleStartDate": "Start date",
145 "titleEndDate": "End date",
146 "titleRecurringTotal": "Recurring total"
147 }
148 },';
149 }
150 $elements .= '{
151 "id": "de242956-a617-4213-9107-138842oi4tch",
152 "type": "BillingAddress",
153 "nameElement": "Billing Shipping Address",
154 "settingRow": {
155 "nameColumn": "BillingShippingAddress",
156 "contentTitle": "[yaymail_billing_shipping_address_title]",
157 "checkBillingShipping": "[yaymail_billing_shipping_address_title]",
158 "titleBilling": "' . $textBillingAddress . '",
159 "titleShipping": "' . $textShippingAddress . '",
160 "content": "[yaymail_billing_shipping_address_content]",
161 "titleColor" : "#7f54b3",
162 "backgroundColor": "#fff",
163 "borderColor": "#e5e5e5",
164 "textColor": "#636363",
165 "family": "Helvetica,Roboto,Arial,sans-serif",
166 "paddingTop": "15",
167 "paddingRight": "50",
168 "paddingBottom": "15",
169 "paddingLeft": "50"
170 }
171 },
172 {
173 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8d",
174 "type": "ElementText",
175 "nameElement": "Text",
176 "settingRow": {
177 "content": "<p><span style=\"font-size: 14px;\">' . $additionalContent . '</span></p>",
178 "backgroundColor": "#fff",
179 "textColor": "#636363",
180 "family": "Helvetica,Roboto,Arial,sans-serif",
181 "paddingTop": "0",
182 "paddingRight": "50",
183 "paddingBottom": "38",
184 "paddingLeft": "50"
185 }
186 },
187 {
188 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds",
189 "type": "ElementText",
190 "nameElement": "Footer",
191 "settingRow": {
192 "content": "<p style=\"font-size: 14px;margin: 0px 0px 16px; text-align: center;\">[yaymail_site_name]&nbsp;- Built with <a style=\"color: #7f54b3; font-weight: normal; text-decoration: underline;\" href=\"https://woocommerce.com\" target=\"_blank\" rel=\"noopener\">WooCommerce</a></p>",
193 "backgroundColor": "#ececec",
194 "textColor": "#8a8a8a",
195 "family": "Helvetica,Roboto,Arial,sans-serif",
196 "paddingTop": "15",
197 "paddingRight": "50",
198 "paddingBottom": "15",
199 "paddingLeft": "50"
200 }
201 }]';
202
203 // Templates New Order
204 $templates = array(
205 'customer_completed_order' => array(),
206 );
207
208 $templates['customer_completed_order']['elements'] = $elements;
209 return $templates;
210 }
211 }
212