PluginProbe
YayMail – WooCommerce Email Customizer / 2.1.4
YayMail – WooCommerce Email Customizer v2.1.4
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 / CustomerRefundedOrder.php

CustomerRefundedOrder.php in YayMail – WooCommerce Email Customizer 2.1.4, at includes/Templates/DefaultTemplate/CustomerRefundedOrder.php

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