Merge pull request #16865 from woocommerce/fix/16862

remove spam field
This commit is contained in:
Claudiu Lodromanean 2017-09-21 09:06:08 -07:00 committed by GitHub
commit 3440460127
2 changed files with 1 additions and 9 deletions

View File

@ -1071,11 +1071,6 @@ class WC_Form_Handler {
throw new Exception( $validation_error->get_error_message() );
}
// Anti-spam trap
if ( ! empty( $_POST['email_2'] ) ) {
throw new Exception( __( 'Anti-spam field was filled in.', 'woocommerce' ) );
}
$new_customer = wc_create_new_customer( sanitize_email( $email ), wc_clean( $username ), $password );
if ( is_wp_error( $new_customer ) ) {

View File

@ -13,7 +13,7 @@
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.6.0
* @version 3.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -101,9 +101,6 @@ if ( ! defined( 'ABSPATH' ) ) {
<?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' ); ?>
<p class="woocommerce-FormRow form-row">