PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / trunk
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster vtrunk
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
sellkit / includes / block-editor / blocks / checkout / templates / form-login.php

form-login.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster trunk, at includes/block-editor/blocks/checkout/templates/form-login.php

178 lines 6.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Checkout login form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-login.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 3.8.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- WooCommerce/Elementor template; variables mirror core docs.
20
21
22
23 if ( is_user_logged_in() ) {
24 $this_user = wp_get_current_user();
25 $email = get_user_meta( $this_user->ID, 'billing_email', true );
26
27 if ( empty( $email ) ) {
28 $email = $this_user->user_email;
29 }
30
31 ?>
32 <div class="sellkit-checkout-widget-login-section sellkit-checkout-widget-logged-user sellkit-checkout-local-fields">
33 <div class="header heading"><?php echo esc_html__( 'Contact Details', 'sellkit' ); ?></div>
34 <div class="sellkit-checkout-widget-email-holder">
35 <div class="sellkit-checkout-fields-wrapper sellkit-widget-checkout-fields sellkit-checkout-excluded-wrapper-fields sellkit-login-section">
36 <div style="position:relative">
37 <span class="free-label">
38 <?php echo esc_html__( 'Email address', 'sellkit' ); ?>
39 </span>
40 </div>
41 <p class="log-email">
42 <span class="woocommerce-input-wrapper">
43 <input
44 type="email"
45 class="input-text validate-email"
46 name="billing_email"
47 id="billing_email"
48 readonly
49 placeholder="<?php echo esc_html__( 'Email Address', 'sellkit' ); ?>"
50 value="<?php echo esc_attr( $email ); ?>"
51 autocomplete="email"
52 />
53 </span>
54 </p>
55 </div>
56 </div>
57 </div>
58 <?php
59 } else {
60 ?>
61 <div class="sellkit-checkout-widget-login-section sellkit-checkout-local-fields">
62 <div class="header heading"><?php echo esc_html__( 'Contact Details', 'sellkit' ); ?></div>
63 <div class="sellkit-checkout-widget-email-holder">
64 <div class="sellkit-checkout-fields-wrapper sellkit-widget-checkout-fields sellkit-checkout-excluded-wrapper-fields sellkit-login-section">
65 <div style="position:relative">
66 <span class="free-label">
67 <?php echo esc_html__( 'Email address', 'sellkit' ); ?>
68 </span>
69 </div>
70 <p>
71 <span class="woocommerce-input-wrapper">
72 <input
73 type="text"
74 name="billing_email"
75 id="billing_email"
76 class="login-mail validate-email"
77 placeholder="<?php echo esc_html__( 'Email Address', 'sellkit' ); ?>"
78 autocomplete="email"
79 autocapitalize="none"
80 autocorrect="off"
81 spellcheck="false"
82 inputmode="email"
83 >
84 </span>
85 <span class="sellkit-checkout-widget-email-error login-section-error">
86 <?php echo esc_html__( 'Email address is not valid.', 'sellkit' ); ?>
87 </span>
88 <span class="sellkit-checkout-widget-email-empty login-section-error">
89 <?php echo esc_html__( 'Email address is empty.', 'sellkit' ); ?>
90 </span>
91 <span class="jupiter-checkout-widget-email-search">
92 <i class="fas fa-sync fa-spin"></i>
93 <?php echo esc_html__( 'Checking...', 'sellkit' ); ?>
94 </span>
95 </p>
96 </div>
97 </div>
98 <div class="login_hidden_section sellkit-checkout-widget-username-field">
99 <?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
100 <div class="sellkit-checkout-fields-wrapper sellkit-widget-checkout-fields sellkit-checkout-excluded-wrapper-fields sellkit-login-section">
101 <div style="position:relative">
102 <span class="free-label">
103 <?php echo esc_html__( 'Username', 'sellkit' ); ?>
104 </span>
105 </div>
106 <p>
107 <input
108 type="text"
109 class="login-username"
110 name="account_username"
111 id="register_user"
112 placeholder="<?php echo esc_html__( 'Username', 'sellkit' ); ?>"
113 >
114 <span class="sellkit-checkout-widget-username-error login-section-error">
115 <?php echo esc_html__( 'An account is already registered with that username. Please choose another..', 'sellkit' ); ?>
116 </span>
117 </p>
118 </div>
119 <?php endif; ?>
120 </div>
121 <div class="login_hidden_section sellkit-checkout-widget-password-field">
122 <div class="sellkit-checkout-fields-wrapper sellkit-widget-checkout-fields sellkit-checkout-excluded-wrapper-fields sellkit-login-section">
123 <div style="position:relative">
124 <span class="free-label">
125 <?php echo esc_html__( 'Password', 'sellkit' ); ?>
126 </span>
127 </div>
128 <p>
129 <input
130 type="password"
131 class="login-pass"
132 <?php
133 if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) {
134 echo 'name="account_password"';
135 echo 'id="register_pass"';
136 } else {
137 echo 'name="account_password"';
138 echo 'id="login_pass"';
139 }
140 ?>
141 placeholder="<?php echo esc_html__( 'Password', 'sellkit' ); ?>"
142 >
143 </p>
144 </div>
145 </div>
146 <?php if ( 'yes' === get_option( 'woocommerce_enable_signup_and_login_from_checkout' ) ) : ?>
147 <div class="create-desc">
148 <div class="sellkit-checkout-fields-wrapper sellkit-widget-checkout-fields sellkit-checkout-excluded-wrapper-fields sellkit-login-section">
149 <p>
150 <input
151 type="checkbox"
152 class="sellkit-create-account-checkbox woocommerce-form__input woocommerce-form__input-checkbox input-checkbox"
153 id="createaccount"
154 name="createaccount"
155 value="1"
156 >
157 <label for="createaccount" class="sellkit-create-account-checkbox-label">
158 <?php
159 $sk_create_account = apply_filters( 'sellkit_checkout_block_create_website_account', esc_html__( 'Create an account', 'sellkit' ) );
160 echo wp_kses_post( $sk_create_account );
161 ?>
162 </label>
163 </p>
164 </div>
165 </div>
166 <?php endif; ?>
167 <div class="login-wrapper login_hidden_section">
168 <div class="sellkit-checkout-fields-wrapper sellkit-widget-checkout-fields sellkit-login-section">
169 <span class="login-submit sellkit-checkout-widget-secondary-button">
170 <?php echo esc_html__( 'Login', 'sellkit' ); ?>
171 </span>
172 <label class="login-result"></label>
173 </div>
174 </div>
175 </div>
176 <?php
177 }
178