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 / CancelledOrder.php

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

196 lines 6.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace YayMail\Templates\DefaultTemplate;
4
5 defined( 'ABSPATH' ) || exit;
6
7 class CancelledOrder {
8
9 protected static $instance = null;
10
11 public static function getInstance() {
12 if ( null == self::$instance ) {
13 self::$instance = new self();
14 }
15
16 return self::$instance;
17 }
18
19 public static function getTemplates() {
20 /*
21 @@@ Html default send email.
22 @@@ Note: Add characters '\' before special characters in a string.
23 @@@ Example: font-family: \'Helvetica Neue\'...
24 */
25
26 $emailTitle = __( 'Order Cancelled: #{order_number}', 'woocommerce' );
27 $emailTitle = str_replace( '#{order_number}', '', $emailTitle );
28 $emailtext = esc_html__( 'Notification to let you know &mdash; order #', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_order_id]' ) ) . esc_html__( ' belonging to ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_billing_first_name] [yaymail_billing_last_name]' ) ) . esc_html__( ' has been cancelled:', 'woocommerce' );
29 $additionalContent = __( 'Thanks for reading.', 'woocommerce' );
30 $textShippingAddress = __( 'Shipping Address', 'woocommerce' );
31 $textBillingAddress = __( 'Billing Address', 'woocommerce' );
32
33 /*
34 @@@ Elements default when reset template.
35 @@@ Note 1: Add characters '\' before special characters in a string.
36 @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif",
37
38 @@@ Note 2: Add characters '\' before special characters in a string.
39 @@@ example 2: "<h1 style=\"font-family: \'Helvetica Neue\',...."
40 */
41
42 // Elements
43 $elements =
44 '[{
45 "id": "8ffa62b5-7258-42cc-ba53-7ae69638c1fe",
46 "type": "Logo",
47 "nameElement": "Logo",
48 "settingRow": {
49 "backgroundColor": "#ECECEC",
50 "align": "center",
51 "pathImg": "",
52 "paddingTop": "15",
53 "paddingRight": "0",
54 "paddingBottom": "15",
55 "paddingLeft": "0",
56 "width": "172",
57 "url": "#"
58 }
59 }, {
60 "id": "802bfe24-7af8-48af-ac5e-6560a81345b3",
61 "type": "ElementText",
62 "nameElement": "Email Heading",
63 "settingRow": {
64 "content": "<h1 style=\"font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: inherit;\">' . $emailTitle . ' #[yaymail_order_id]</h1>",
65 "backgroundColor": "#7f54b3",
66 "textColor": "#ffffff",
67 "family": "Helvetica,Roboto,Arial,sans-serif",
68 "paddingTop": "36",
69 "paddingRight": "48",
70 "paddingBottom": "36",
71 "paddingLeft": "48"
72 }
73 }, {
74 "id": "b035d1f1-0cfe-41c5-b79c-0478f144ef5f",
75 "type": "ElementText",
76 "nameElement": "Text",
77 "settingRow": {
78 "content": "<p style=\"margin: 0px;\"><span style=\"font-size: 14px;\">' . $emailtext . '</span></p>",
79 "backgroundColor": "#fff",
80 "textColor": "#636363",
81 "family": "Helvetica,Roboto,Arial,sans-serif",
82 "paddingTop": "47",
83 "paddingRight": "50",
84 "paddingBottom": "0",
85 "paddingLeft": "50"
86 }
87 },
88 {
89 "id": "ad422370-f762-4a26-92de-c4cf3878h0oi",
90 "type": "OrderItem",
91 "nameElement": "Order Item",
92 "settingRow": {
93 "contentBefore": "[yaymail_items_border_before]",
94 "contentAfter": "[yaymail_items_border_after]",
95 "contentTitle": "[yaymail_items_border_title]",
96 "content": "[yaymail_items_border_content]",
97 "backgroundColor": "#fff",
98 "titleColor" : "#7f54b3",
99 "textColor": "#636363",
100 "borderColor": "#e5e5e5",
101 "family": "Helvetica,Roboto,Arial,sans-serif",
102 "paddingTop": "15",
103 "paddingRight": "50",
104 "paddingBottom": "15",
105 "paddingLeft": "50"
106 }
107 },';
108 if ( class_exists( 'WC_Subscription' ) ) {
109 $elements .= '{
110 "id": "os422370-f762-4a26-92de-c4cf3878h0oi",
111 "type": "AddonWooSubscriptionInformation",
112 "nameElement": "Woo Subscription Information",
113 "settingRow": {
114 "backgroundColor":"#fff",
115 "borderColor":"#e5e5e5",
116 "content":"This is content",
117 "contentAfter":"[yaymail_items_border_after]",
118 "contentBefore":"[yaymail_items_border_before]",
119 "contentTitle":"Subscription information",
120 "family":"Helvetica,Roboto,Arial,sans-serif",
121 "paddingBottom":"15",
122 "paddingLeft":"50",
123 "paddingRight":"50",
124 "paddingTop":"15",
125 "textColor":"#636363",
126 "titleColor":"#7f54b3",
127 "titleID": "ID",
128 "titleStartDate": "Start date",
129 "titleEndDate": "End date",
130 "titleRecurringTotal": "Recurring total"
131 }
132 },';
133 }
134 $elements .= '{
135 "id": "de242956-a617-4213-9107-138842oi4tch",
136 "type": "BillingAddress",
137 "nameElement": "Billing Shipping Address",
138 "settingRow": {
139 "nameColumn": "BillingShippingAddress",
140 "contentTitle": "[yaymail_billing_shipping_address_title]",
141 "checkBillingShipping": "[yaymail_billing_shipping_address_title]",
142 "titleBilling": "' . $textBillingAddress . '",
143 "titleShipping": "' . $textShippingAddress . '",
144 "content": "[yaymail_billing_shipping_address_content]",
145 "titleColor" : "#7f54b3",
146 "backgroundColor": "#fff",
147 "borderColor": "#e5e5e5",
148 "textColor": "#636363",
149 "family": "Helvetica,Roboto,Arial,sans-serif",
150 "paddingTop": "15",
151 "paddingRight": "50",
152 "paddingBottom": "15",
153 "paddingLeft": "50"
154 }
155 },
156 {
157 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8d",
158 "type": "ElementText",
159 "nameElement": "Text",
160 "settingRow": {
161 "content": "<p><span style=\"font-size: 14px;\">' . $additionalContent . '</span></p>",
162 "backgroundColor": "#fff",
163 "textColor": "#636363",
164 "family": "Helvetica,Roboto,Arial,sans-serif",
165 "paddingTop": "0",
166 "paddingRight": "50",
167 "paddingBottom": "38",
168 "paddingLeft": "50"
169 }
170 },
171 {
172 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds",
173 "type": "ElementText",
174 "nameElement": "Footer",
175 "settingRow": {
176 "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>",
177 "backgroundColor": "#ececec",
178 "textColor": "#8a8a8a",
179 "family": "Helvetica,Roboto,Arial,sans-serif",
180 "paddingTop": "15",
181 "paddingRight": "50",
182 "paddingBottom": "15",
183 "paddingLeft": "50"
184 }
185 }]';
186
187 // Templates Cancelled Order
188 $templates = array(
189 'cancelled_order' => array(),
190 );
191
192 $templates['cancelled_order']['elements'] = $elements;
193 return $templates;
194 }
195 }
196