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

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

117 lines 4.6 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
31 $passwordGenerate = '';
32 if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) ) {
33 /* translators: %s: Auto generated password */
34 $passwordGenerate = sprintf( esc_html__( 'Your password has been automatically generated: %s', 'woocommerce' ), '<strong>' . esc_html( do_shortcode( '[yaymail_user_new_password]' ) ) . '</strong>' );
35 }
36
37 /*
38 @@@ Elements default when reset template.
39 @@@ Note 1: Add characters '\' before special characters in a string.
40 @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif",
41
42 @@@ Note 2: Add characters '\' before special characters in a string.
43 @@@ example 2: "<h1 style=\"font-family: \'Helvetica Neue\',...."
44 */
45
46 // Elements
47 $elements =
48 '[{
49 "id": "8ffa62b5-7258-42cc-ba53-7ae69638c1fe",
50 "type": "Logo",
51 "nameElement": "Logo",
52 "settingRow": {
53 "backgroundColor": "#ECECEC",
54 "align": "center",
55 "pathImg": "",
56 "paddingTop": "15",
57 "paddingRight": "0",
58 "paddingBottom": "15",
59 "paddingLeft": "0",
60 "width": "172",
61 "url": "#"
62 }
63 }, {
64 "id": "802bfe24-7af8-48af-ac5e-6560a81345b3",
65 "type": "ElementText",
66 "nameElement": "Email Heading",
67 "settingRow": {
68 "content": "<h1 style=\"font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: inherit;\">' . $emailTitle . '[yaymail_site_name]</h1>",
69 "backgroundColor": "#7f54b3",
70 "textColor": "#ffffff",
71 "family": "Helvetica,Roboto,Arial,sans-serif",
72 "paddingTop": "36",
73 "paddingRight": "48",
74 "paddingBottom": "36",
75 "paddingLeft": "48"
76 }
77 }, {
78 "id": "93a42108-3850-4400-a058-41ba05c0c047",
79 "type": "ElementText",
80 "nameElement": "Text",
81 "settingRow": {
82 "content": "<p style=\"margin: 0px;\"><span style=\"font-size: 14px;\">' . $emailHi . '<br><br>' . $emailtext . '</span></p><p style=\"margin: 26px 0px 0px 0px;\"><span style=\"font-size: 14px;\">' . $passwordGenerate . '</span></p><p style=\"margin: 26px 0px 0px 0px;\"><span style=\"font-size: 14px;\">' . $emailtext_1 . '</span></p>",
83 "backgroundColor": "#fff",
84 "textColor": "#636363",
85 "family": "Helvetica,Roboto,Arial,sans-serif",
86 "paddingTop": "32",
87 "paddingRight": "48",
88 "paddingBottom": "32",
89 "paddingLeft": "48"
90 }
91 },{
92 "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds",
93 "type": "ElementText",
94 "nameElement": "Footer",
95 "settingRow": {
96 "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>",
97 "backgroundColor": "#ececec",
98 "textColor": "#8a8a8a",
99 "family": "Helvetica,Roboto,Arial,sans-serif",
100 "paddingTop": "15",
101 "paddingRight": "50",
102 "paddingBottom": "15",
103 "paddingLeft": "50"
104 }
105 }
106 ]';
107
108 // Templates New Order
109 $templates = array(
110 'customer_new_account' => array(),
111 );
112
113 $templates['customer_new_account']['elements'] = $elements;
114 return $templates;
115 }
116 }
117