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

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

169 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 CustomerNewAccount {
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
25 $emailTitle = __( 'Welcome to {site_title}', 'woocommerce' );
26 $emailTitle = str_replace( '{site_title}', '', $emailTitle );
27 $emailHi = esc_html__( 'Hi ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_customer_username]' ) . ',' );
28 $emailtext = esc_html__( 'Thanks for creating an account on ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_site_name]' ) ) . esc_html__( '. Your username is ', 'woocommerce' ) . '<strong>' . esc_html( do_shortcode( '[yaymail_customer_username]' ) ) . '</strong>' . esc_html__( '. You can access your account area to view orders, change your password, and more at: ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_user_account_url]' ) );
29 $emailtext_1 = __( 'We look forward to seeing you soon.', 'woocommerce' );
30 $passwordGenerate = '';
31 if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) ) {
32 /* translators: %s: Auto generated password */
33 $passwordGenerate = sprintf( esc_html__( 'Your password has been automatically generated: %s', 'woocommerce' ), '<strong>' . esc_html( do_shortcode( '[yaymail_user_new_password]' ) ) . '</strong>' );
34 }
35 // Html
36 $html = '
37 <html>
38 <head>
39 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
40 </head>
41 <body style="background: rgb(236, 236, 236); padding: 0;">
42 <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;">
43 <tbody >
44 <tr >
45 <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>
46 </tr>
47 </tbody>
48 </table>
49 <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;">
50 <tbody >
51 <tr >
52 <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;">
53 <div >
54 <h1 style="font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: #fff;">' . $emailTitle . '[yaymail_site_name]</h1>
55 </div>
56 </td>
57 </tr>
58 </tbody>
59 </table>
60 <table width="605px" cellspacing="0" cellpadding="0" border="0" align="center" id="web93a42108-3850-4400-a058-41ba05c0c047" class="web-main-row" style="display: table; background-color: rgb(255, 255, 255); width: 605px;">
61 <tbody >
62 <tr >
63 <td id="web93a42108-3850-4400-a058-41ba05c0c047-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 44px;">
64 <div >
65 <p style="margin: 0px;"><span style="color: #636363; font-size: 14px;">' . $emailHi . '<br><br>' . $emailtext . '</span></p>
66 <p style="margin: 26px 0px 0px 0px;"><span style="color: #636363; font-size: 14px;">' . $passwordGenerate . '</span></p>
67 <p style="margin: 26px 0px 0px 0px;"><span style="color: #636363; font-size: 14px;">' . $emailtext_1 . '</span></p>
68 </div>
69 </td>
70 </tr>
71 </tbody>
72 </table>
73 <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;">
74 <tbody >
75 <tr >
76 <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;">
77 <div >
78 <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>
79 </div>
80 </td>
81 </tr>
82 </tbody>
83 </table>
84 </body>
85 </html>
86 ';
87
88 /*
89 @@@ Elements default when reset template.
90 @@@ Note 1: Add characters '\' before special characters in a string.
91 @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif",
92
93 @@@ Note 2: Add characters '\' before special characters in a string.
94 @@@ example 2: "<h1 style=\"font-family: \'Helvetica Neue\',...."
95 */
96
97 // Elements
98 $elements =
99 '[{
100 "id": "8ffa62b5-7258-42cc-ba53-7ae69638c1fe",
101 "type": "Logo",
102 "nameElement": "Logo",
103 "settingRow": {
104 "backgroundColor": "#ECECEC",
105 "align": "center",
106 "pathImg": "",
107 "paddingTop": "15",
108 "paddingRight": "50",
109 "paddingBottom": "15",
110 "paddingLeft": "50",
111 "width": "172",
112 "url": "#"
113 }
114 }, {
115 "id": "802bfe24-7af8-48af-ac5e-6560a81345b3",
116 "type": "ElementText",
117 "nameElement": "Email Heading",
118 "settingRow": {
119 "content": "<h1 style=\"font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: inherit;\">' . $emailTitle . '[yaymail_site_name]</h1>",
120 "backgroundColor": "#96588A",
121 "textColor": "#ffffff",
122 "family": "Helvetica,Roboto,Arial,sans-serif",
123 "paddingTop": "36",
124 "paddingRight": "48",
125 "paddingBottom": "36",
126 "paddingLeft": "48"
127 }
128 }, {
129 "id": "93a42108-3850-4400-a058-41ba05c0c047",
130 "type": "ElementText",
131 "nameElement": "Text",
132 "settingRow": {
133 "content": "<p style=\"margin: 0px;\"><span style=\"color: #636363; font-size: 14px;\">' . $emailHi . '<br><br>' . $emailtext . '</span></p><p style=\"margin: 26px 0px 0px 0px;\"><span style=\"color: #636363; font-size: 14px;\">' . $passwordGenerate . '</span></p><p style=\"margin: 26px 0px 0px 0px;\"><span style=\"color: #636363; font-size: 14px;\">' . $emailtext_1 . '</span></p>",
134 "backgroundColor": "#fff",
135 "textColor": "#636363",
136 "family": "Helvetica,Roboto,Arial,sans-serif",
137 "paddingTop": "32",
138 "paddingRight": "48",
139 "paddingBottom": "32",
140 "paddingLeft": "48"
141 }
142 },{
143 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds",
144 "type": "ElementText",
145 "nameElement": "Footer",
146 "settingRow": {
147 "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>",
148 "backgroundColor": "#ececec",
149 "textColor": "#8a8a8a",
150 "family": "Helvetica,Roboto,Arial,sans-serif",
151 "paddingTop": "15",
152 "paddingRight": "50",
153 "paddingBottom": "15",
154 "paddingLeft": "50"
155 }
156 }
157 ]';
158
159 // Templates New Order
160 $templates = array(
161 'customer_new_account' => array(),
162 );
163
164 $templates['customer_new_account']['html'] = $html;
165 $templates['customer_new_account']['elements'] = $elements;
166 return $templates;
167 }
168 }
169