/var/www/html/wp-content/plugins/yaymail/includes/Templates/DefaultTemplate/CustomerNewAccount.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
namespace YayMail\Templates\DefaultTemplate;

defined'ABSPATH' ) || exit;

class 
CustomerNewAccount {

    protected static 
$instance null;

    public static function 
getInstance() {
        if ( 
null == self::$instance ) {
            
self::$instance = new self();
        }

        return 
self::$instance;
    }

    public static function 
getTemplates() {
        
/*
        @@@ Html default send email.
        @@@ Note: Add characters '\' before special characters in a string.
        @@@ Example: font-family: \'Helvetica Neue\'...
        */

        
$emailTitle  __'Welcome to {site_title}''woocommerce' );
        
$emailTitle  str_replace'{site_title}'''$emailTitle );
        
$emailHi     esc_html__'Hi ''woocommerce' ) . esc_htmldo_shortcode'[yaymail_customer_username]' ) . ',' );
        
$emailtext   esc_html__'Thanks for creating an account on ''woocommerce' ) . esc_htmldo_shortcode'[yaymail_site_name]' ) ) . esc_html__'. Your username is ''woocommerce' ) . '<strong>' esc_htmldo_shortcode'[yaymail_customer_username]' ) ) . '</strong>' esc_html__'. You can access your account area to view orders, change your password, and more at: ''woocommerce' ) . esc_htmldo_shortcode'[yaymail_user_account_url]' ) );
        
$emailtext_1 __'We look forward to seeing you soon.''woocommerce' );

        
$passwordGenerate '';
        if ( 
'yes' === get_option'woocommerce_registration_generate_password' ) ) {
            
/* translators: %s: Auto generated password */
            
$passwordGenerate sprintf' <a href=\"%s\">%s</a>'do_shortcode'[yaymail_set_password_url_string]' ), esc_html__'Click here to set your new password.''woocommerce' ) );
        }

        
/*
        @@@ Elements default when reset template.
        @@@ Note 1: Add characters '\' before special characters in a string.
        @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif",

        @@@ Note 2: Add characters '\' before special characters in a string.
        @@@ example 2: "<h1 style=\"font-family: \'Helvetica Neue\',...."
        */

        // Elements
        
$elements =
        
'[{
        "id": "8ffa62b5-7258-42cc-ba53-7ae69638c1fe",
        "type": "Logo",
        "nameElement": "Logo",
        "settingRow": {
          "backgroundColor": "#ECECEC",
          "align": "center",
          "pathImg": "",
          "paddingTop": "15",
          "paddingRight": "0",
          "paddingBottom": "15",
          "paddingLeft": "0",
          "width": "172",
          "url": "#"
        }
      }, {
        "id": "802bfe24-7af8-48af-ac5e-6560a81345b3",
        "type": "ElementText",
        "nameElement": "Email Heading",
        "settingRow": {
          "content": "<h1 style=\"font-size: 30px; font-weight: 300; line-height: normal; margin: 0; color: inherit;\">' 
$emailTitle '[yaymail_site_name]</h1>",
          "backgroundColor": "#7f54b3",
          "textColor": "#ffffff",
          "family": "Helvetica,Roboto,Arial,sans-serif",
          "paddingTop": "36",
          "paddingRight": "48",
          "paddingBottom": "36",
          "paddingLeft": "48"
        }
      }, {
        "id": "93a42108-3850-4400-a058-41ba05c0c047",
        "type": "ElementText",
        "nameElement": "Text",
        "settingRow": {
          "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>",
          "backgroundColor": "#fff",
          "textColor": "#636363",
          "family": "Helvetica,Roboto,Arial,sans-serif",
          "paddingTop": "32",
          "paddingRight": "48",
          "paddingBottom": "32",
          "paddingLeft": "48"
        }
      },{
        "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds",
        "type": "ElementText",
        "nameElement": "Footer",
        "settingRow": {
          "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>",
          "backgroundColor": "#ececec",
          "textColor": "#8a8a8a",
          "family": "Helvetica,Roboto,Arial,sans-serif",
          "paddingTop": "15",
          "paddingRight": "50",
          "paddingBottom": "15",
          "paddingLeft": "50"
        }
      }
      ]'
;

        
// Templates New Order
        
$templates = array(
            
'customer_new_account' => array(),
        );

        
$templates['customer_new_account']['elements'] = $elements;
        return 
$templates;
    }
}