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

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

170 lines 8.8 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 CustomerResetPassword {
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 = __( 'Password Reset Request', 'woocommerce' );
25 $emailHi = esc_html__( 'Hi ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_customer_username]' ) . ',' );
26 $emailtext = esc_html__( 'Someone has requested a new password for the following account on ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_site_name]' ) . ':' );
27 $emailtext_1 = esc_html__( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' );
28 $textUserName = __( 'Username', 'woocommerce' );
29 $additionalContent = __( 'Thanks for reading.', 'woocommerce' );
30
31 // Html
32 $html = '
33 <html>
34 <head>
35 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
36 </head>
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;"><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></td>
42 </tr>
43 </tbody>
44 </table>
45 <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;">
46 <tbody >
47 <tr >
48 <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;">
49 <div >
50 <h1 style="font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: #fff;">' . $emailTitle . '</h1>
51 </div>
52 </td>
53 </tr>
54 </tbody>
55 </table>
56 <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;">
57 <tbody >
58 <tr >
59 <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: 32px 48px;">
60 <div >
61 <p style="margin: 0 0 16px;"><span style="color: #636363; font-size: 14px;">' . $emailHi . '</span></p>
62 <p style="margin: 0 0 16px;"><span style="color: #636363; font-size: 14px;">' . $emailtext . '</span></p>
63 <p style="margin: 0 0 16px;"><span style="color: #636363; font-size: 14px;">' . $textUserName . ': [yaymail_customer_username]</span></p>
64 <p style="margin: 0 0 16px;"><span style="color: #636363; font-size: 14px;">' . $emailtext_1 . '</span></p>
65 <p style="margin: 0 0 16px;">
66 [yaymail_password_reset_url]
67 </p>
68 <p style="margin: 0 0 16px;"><span style="color: #636363; font-size: 14px;">' . $additionalContent . '</span></p>
69 </div>
70 </td>
71 </tr>
72 </tbody>
73 </table>
74 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="web964bb3b1-2e11-4eb1-a2b0-440c8da21257" class="web-main-row" style="display: table; background-color: rgb(236, 236, 236); width: 605px;">
75 <tbody >
76 <tr >
77 <td id="web964bb3b1-2e11-4eb1-a2b0-440c8da21257-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;">
78 <div >
79 <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">WooCommerce</a></p>
80 </div>
81 </td>
82 </tr>
83 </tbody>
84 </table>
85 </body>
86 </html>
87 ';
88
89 /*
90 @@@ Elements default when reset template.
91 @@@ Note 1: Add characters '\' before special characters in a string.
92 @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif",
93
94 @@@ Note 2: Add characters '\' before special characters in a string.
95 @@@ example 2: "<h1 style=\"font-family: \'Helvetica Neue\',...."
96 */
97
98 // Elements
99 $elements =
100 '[
101 {
102 "id": "8ffa62b5-7258-42cc-ba53-7ae69638c1fe",
103 "type": "Logo",
104 "nameElement": "Logo",
105 "settingRow": {
106 "backgroundColor": "#ECECEC",
107 "align": "center",
108 "pathImg": "",
109 "paddingTop": "15",
110 "paddingRight": "50",
111 "paddingBottom": "15",
112 "paddingLeft": "50",
113 "width": "172",
114 "url": "#"
115 }
116 }, {
117 "id": "802bfe24-7af8-48af-ac5e-6560a81345b3",
118 "type": "ElementText",
119 "nameElement": "Email Heading",
120 "settingRow": {
121 "content": "<h1 style=\"font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: inherit;\">' . $emailTitle . '</h1>",
122 "backgroundColor": "#96588A",
123 "textColor": "#ffffff",
124 "family": "Helvetica,Roboto,Arial,sans-serif",
125 "paddingTop": "36",
126 "paddingRight": "48",
127 "paddingBottom": "36",
128 "paddingLeft": "48"
129 }
130 }, {
131 "id": "b035d1f1-0cfe-41c5-b79c-0478f144ef5f",
132 "type": "ElementText",
133 "nameElement": "Text",
134 "settingRow": {
135 "content": "<p style=\"margin: 0 0 16px;\"><span style=\"font-size: 14px;\">' . $emailHi . '</span></p>\n<p style=\"margin: 0 0 16px;\"><span style=\"font-size: 14px;\">' . $emailtext . '</span></p>\n<p style=\"margin: 0 0 16px;\"><span style=\"font-size: 14px;\">' . $textUserName . ': [yaymail_customer_username]</span></p>\n<p style=\"margin: 0 0 16px;\"><span style=\"font-size: 14px;\">' . $emailtext_1 . '</span></p>\n<p style=\"margin: 0 0 16px;\"><span style=\"font-size: 14px;\">[yaymail_password_reset_url]</span></p>\n<p style=\"margin: 0 0 16px;\"><span style=\"font-size: 14px;\">' . $additionalContent . '</span></p>",
136 "backgroundColor": "#fff",
137 "textColor": "#636363",
138 "family": "Helvetica,Roboto,Arial,sans-serif",
139 "paddingTop": "32",
140 "paddingRight": "48",
141 "paddingBottom": "32",
142 "paddingLeft": "48"
143 }
144 }, {
145 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds",
146 "type": "ElementText",
147 "nameElement": "Footer",
148 "settingRow": {
149 "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>",
150 "backgroundColor": "#ececec",
151 "textColor": "#8a8a8a",
152 "family": "Helvetica,Roboto,Arial,sans-serif",
153 "paddingTop": "15",
154 "paddingRight": "50",
155 "paddingBottom": "15",
156 "paddingLeft": "50"
157 }
158 }]';
159
160 // Templates New Order
161 $templates = array(
162 'customer_reset_password' => array(),
163 );
164
165 $templates['customer_reset_password']['html'] = $html;
166 $templates['customer_reset_password']['elements'] = $elements;
167 return $templates;
168 }
169 }
170