plugin updates
This commit is contained in:
@@ -1132,7 +1132,17 @@ class WC_Checkout {
|
||||
);
|
||||
|
||||
if ( is_wp_error( $customer_id ) ) {
|
||||
throw new Exception( $customer_id->get_error_message() );
|
||||
if ( 'registration-error-email-exists' === $customer_id->get_error_code() ) {
|
||||
/**
|
||||
* Filter the notice shown when a customer tries to register with an existing email address.
|
||||
*
|
||||
* @since 3.3.0
|
||||
* @param string $message The notice.
|
||||
* @param string $email The email address.
|
||||
*/
|
||||
throw new Exception( apply_filters( 'woocommerce_registration_error_email_exists', __( 'An account is already registered with your email address. <a href="#" class="showlogin">Please log in.</a>', 'woocommerce' ), $data['billing_email'] ) ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped
|
||||
}
|
||||
throw new Exception( $customer_id->get_error_message() ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped
|
||||
}
|
||||
|
||||
wc_set_customer_auth_cookie( $customer_id );
|
||||
@@ -1357,7 +1367,7 @@ class WC_Checkout {
|
||||
|
||||
if ( is_callable( array( $customer_object, "get_$input" ) ) ) {
|
||||
$value = $customer_object->{"get_$input"}();
|
||||
} elseif ( $customer_object->meta_exists( $input ) ) {
|
||||
} elseif ( is_callable( array( $customer_object, 'meta_exists' ) ) && $customer_object->meta_exists( $input ) ) {
|
||||
$value = $customer_object->get_meta( $input, true );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user