commit
3440460127
|
@ -1071,11 +1071,6 @@ class WC_Form_Handler {
|
||||||
throw new Exception( $validation_error->get_error_message() );
|
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 );
|
$new_customer = wc_create_new_customer( sanitize_email( $email ), wc_clean( $username ), $password );
|
||||||
|
|
||||||
if ( is_wp_error( $new_customer ) ) {
|
if ( is_wp_error( $new_customer ) ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* @see https://docs.woocommerce.com/document/template-structure/
|
* @see https://docs.woocommerce.com/document/template-structure/
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
* @package WooCommerce/Templates
|
* @package WooCommerce/Templates
|
||||||
* @version 2.6.0
|
* @version 3.2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
@ -101,9 +101,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
<?php endif; ?>
|
<?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( 'woocommerce_register_form' ); ?>
|
||||||
|
|
||||||
<p class="woocommerce-FormRow form-row">
|
<p class="woocommerce-FormRow form-row">
|
||||||
|
|
Loading…
Reference in New Issue