PluginProbe
WooCommerce / 11.0.0
WooCommerce v11.0.0
11.1.0 11.1.0-rc.2 11.1.0-rc.1 11.1.0-beta.2 11.1.0-beta.1 11.0.1 11.0.0 11.0.0-rc.3 11.0.0-rc.2 11.0.0-rc.1 11.0.0-beta.2 11.0.0-beta.1 10.9.4 10.9.3 10.9.2 10.9.1 10.9.0 10.9.0-rc.1 10.9.0-beta.2 10.9.0-beta.1 10.8.1 10.8.0 10.8.0-rc.1 10.8.0-beta.2 10.8.0-beta.1 All 648 releases
woocommerce / templates / checkout / form-login.php
form-login.php
53 lines 1.8 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://woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 10.0.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 $registration_at_checkout = WC_Checkout::instance()->is_registration_enabled();
21 $login_reminder_at_checkout = 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' );
22
23 if ( is_user_logged_in() ) {
24 return;
25 }
26
27 if ( $login_reminder_at_checkout ) : ?>
28 <div class="woocommerce-form-login-toggle">
29 <?php
30 wc_print_notice(
31 apply_filters( 'woocommerce_checkout_login_message', esc_html__( 'Returning customer?', 'woocommerce' ) ) . // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
32 ' <a href="#" class="showlogin">' . esc_html__( 'Click here to login', 'woocommerce' ) . '</a>',
33 'notice'
34 );
35 ?>
36 </div>
37 <?php
38 endif;
39
40 if ( $registration_at_checkout || $login_reminder_at_checkout ) :
41
42 // Always show the form after a login attempt.
43 $show_form = isset( $_POST['login'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
44
45 woocommerce_login_form(
46 array(
47 'message' => esc_html__( 'If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing section.', 'woocommerce' ),
48 'redirect' => wc_get_checkout_url(),
49 'hidden' => ! $show_form,
50 )
51 );
52 endif;
53