Prevent duplicate IDs on checkout page

This commit is contained in:
Caleb Burks 2017-12-17 22:43:51 -06:00
parent 906efe1ffc
commit 82c5975b37
2 changed files with 2 additions and 1 deletions

View File

@ -925,6 +925,7 @@ class WC_Form_Handler {
* Process the login form.
*/
public static function process_login() {
// The global form-login.php template used `_wpnonce` in template versions < 3.3.0.
$nonce_value = isset( $_POST['_wpnonce'] ) ? $_POST['_wpnonce'] : '';
$nonce_value = isset( $_POST['woocommerce-login-nonce'] ) ? $_POST['woocommerce-login-nonce'] : $nonce_value;

View File

@ -44,7 +44,7 @@ if ( is_user_logged_in() ) {
<?php do_action( 'woocommerce_login_form' ); ?>
<p class="form-row">
<?php wp_nonce_field( 'woocommerce-login' ); ?>
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
<button type="submit" class="button" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>"><?php esc_html_e( 'Login', 'woocommerce' ); ?></button>
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ) ?>" />
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">