ASTRA_Ext_WooCommerce_Markup::astra_check_email_exist()
Check email exist.
Description
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function astra_check_email_exist() { check_ajax_referer( 'check-email-exist', 'security' ); $email_address = isset( $_POST['email_address'] ) ? sanitize_email( wp_unslash( $_POST['email_address'] ) ) : false; $is_exist = email_exists( $email_address ); $response = array( 'success' => filter_var( $is_exist, FILTER_VALIDATE_BOOLEAN ), 'is_login_allowed' => 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ), 'msg' => $is_exist ? __( 'Email Exist.', 'astra-addon' ) : __( 'Email not exist', 'astra-addon' ), ); wp_send_json_success( $response ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.9.0 | Introduced. |