public function get_customer_by_email( $email, $fields = null ) {
        try {
            if ( is_email( $email ) ) {
                $customer = get_user_by( 'email', $email );
                if ( ! is_object( $customer ) ) {