Update for Woocommerce 3.2.1 Compatibility
This commit is contained in:
parent
64a81a46fb
commit
3479a9a8c6
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.1.0
|
||||
* @version 3.2.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -36,17 +36,17 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<h2><?php _e( 'Login', 'woocommerce' ); ?></h2>
|
||||
|
||||
<form method="post" class="login">
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="username" id="username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" />
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
|
||||
</p>
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="password" name="password" id="password" />
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
@ -54,8 +54,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<p class="form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" />
|
||||
<label for="rememberme" class="inline">
|
||||
<input class="woocommerce-Input woocommerce-Input--checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php _e( 'Remember me', 'woocommerce' ); ?>
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php _e( 'Remember me', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
|
@ -80,34 +80,30 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_username"><?php _e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" />
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_email"><?php _e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php if ( ! empty( $_POST['email'] ) ) echo esc_attr( $_POST['email'] ); ?>" />
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( $_POST['email'] ) : ''; ?>" />
|
||||
</p>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" />
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Spam Trap -->
|
||||
<div style="<?php echo ( ( is_rtl() ) ? 'right' : 'left' ); ?>: -999em; position: absolute;"><label for="trap"><?php _e( 'Anti-spam', 'woocommerce' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" autocomplete="off" /></div>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form' ); ?>
|
||||
<?php do_action( 'register_form' ); ?>
|
||||
|
||||
<p class="woocomerce-FormRow form-row">
|
||||
<p class="woocommerce-FormRow form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
|
||||
<input type="submit" class="woocommerce-Button button" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>" />
|
||||
</p>
|
||||
|
|
Reference in New Issue