Skip to content

Commit 4b427f4

Browse files
v3.1.3
1 parent 03269c8 commit 4b427f4

5 files changed

Lines changed: 37 additions & 20 deletions

email-verification-for-woocommerce.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Customer Email Verification for WooCommerce
44
Plugin URI: https://wpfactory.com/item/email-verification-for-woocommerce/
55
Description: Verify user emails in WooCommerce. Beautifully.
6-
Version: 3.1.2
6+
Version: 3.1.3
77
Author: WPFactory
88
Author URI: https://wpfactory.com
99
Text Domain: emails-verification-for-woocommerce
@@ -65,7 +65,7 @@ final class Alg_WC_Email_Verification {
6565
* @var string
6666
* @since 1.0.0
6767
*/
68-
public $version = '3.1.2';
68+
public $version = '3.1.3';
6969

7070
/**
7171
* @var Alg_WC_Email_Verification The single instance of the class

includes/class-alg-wc-ev-guest-verification.php

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Email Verification for WooCommerce - Guest Verification.
44
*
5-
* @version 3.1.2
5+
* @version 3.1.3
66
* @since 2.8.0
77
* @author WPFactory
88
*/
@@ -197,29 +197,48 @@ function alg_wc_ev_send_guest_verification_email_action( $param ) {
197197
/**
198198
* checkout_validate_guest_email.
199199
*
200-
* @version 3.1.2
200+
* @version 3.1.3
201201
* @since 2.5.8
202202
*
203203
* @return string
204204
*/
205205
function checkout_validate_guest_email( $_posted, $errors ) {
206+
if ( $this->need_to_validate_guest_email_and_posted_email_is_wrong( $_posted ) ) {
207+
$errors->add( 'alg_wc_ev_verify_guest_email', alg_wc_ev()->core->messages->get_guest_unverified_message() );
208+
}
209+
}
210+
211+
/**
212+
* need_to_validate_guest_email_and_posted_email_is_wrong.
213+
*
214+
* @version 3.1.3
215+
* @since 3.1.3
216+
*
217+
* @param $posted
218+
*
219+
* @return bool
220+
*/
221+
function need_to_validate_guest_email_and_posted_email_is_wrong( $posted ) {
222+
$response = false;
206223
if (
207224
'yes' === get_option( 'alg_wc_ev_verify_guest_email', 'no' ) &&
208225
! is_user_logged_in() &&
209226
(
210-
( isset( $_posted['billing_email'] ) && ! empty( $_posted['billing_email'] ) && ! $this->is_guest_email_already_verified( $_posted['billing_email'] ) ) ||
211-
( isset( $_posted['billing_email'] ) && empty( $_posted['billing_email'] ) ) ||
212-
! isset( $_posted['billing_email'] )
227+
( isset( $posted['billing_email'] ) && ! empty( $posted['billing_email'] ) && ! $this->is_guest_email_already_verified( $posted['billing_email'] ) ) ||
228+
( isset( $posted['billing_email'] ) && empty( $posted['billing_email'] ) ) ||
229+
! isset( $posted['billing_email'] )
213230
)
214231
) {
215-
$errors->add( 'alg_wc_ev_verify_guest_email', alg_wc_ev()->core->messages->get_guest_unverified_message() );
232+
$response = true;
216233
}
234+
235+
return $response;
217236
}
218237

219238
/**
220239
* checkout_validate_guest_email_on_checkout_create_order.
221240
*
222-
* @version 3.1.0
241+
* @version 3.1.3
223242
* @since 3.0.4
224243
*
225244
* @param $order
@@ -229,12 +248,7 @@ function checkout_validate_guest_email( $_posted, $errors ) {
229248
* @return mixed
230249
*/
231250
function checkout_validate_guest_email_on_checkout_create_order( $order, $_posted ) {
232-
if (
233-
'yes' === get_option( 'alg_wc_ev_verify_guest_email', 'no' ) &&
234-
! is_user_logged_in() &&
235-
( isset( $_posted['billing_email'] ) && ! empty( $_posted['billing_email'] ) && ! $this->is_guest_email_already_verified( $_posted['billing_email'] ) ) ||
236-
( ! isset( $_posted['billing_email'] ) || empty( $_posted['billing_email'] ) )
237-
) {
251+
if ( $this->need_to_validate_guest_email_and_posted_email_is_wrong( $_posted ) ) {
238252
$message = alg_wc_ev()->core->messages->get_guest_unverified_message();
239253
throw new Exception( $message );
240254
}

langs/emails-verification-for-woocommerce-fr_FR.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ msgid "Email verified"
5757
msgstr "Email vérifié"
5858

5959
#: includes/class-alg-wc-ev-emails.php:477
60-
#: includes/class-alg-wc-ev-guest-verification.php:486
60+
#: includes/class-alg-wc-ev-guest-verification.php:500
6161
#: includes/pro/class-alg-wc-ev-activation-wc-email-pro.php:157
6262
#: includes/pro/class-alg-wc-ev-pro.php:903
6363
#: includes/settings/class-alg-wc-ev-settings-email.php:128

langs/emails-verification-for-woocommerce.pot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GNU General Public License v3.0.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: emails-verification-for-woocommerce 3.1.2\n"
5+
"Project-Id-Version: emails-verification-for-woocommerce 3.1.3\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/emails-verification-for-woocommerce\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2025-10-13T21:34:19+02:00\n"
12+
"POT-Creation-Date: 2025-10-14T19:24:26+02:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.7.1\n"
1515
"X-Domain: emails-verification-for-woocommerce\n"
@@ -254,7 +254,7 @@ msgid "User %s has just verified his email (%s) on %s."
254254
msgstr ""
255255

256256
#: includes/class-alg-wc-ev-emails.php:477
257-
#: includes/class-alg-wc-ev-guest-verification.php:486
257+
#: includes/class-alg-wc-ev-guest-verification.php:500
258258
#: includes/pro/class-alg-wc-ev-activation-wc-email-pro.php:157
259259
#: includes/pro/class-alg-wc-ev-pro.php:903
260260
#: includes/settings/class-alg-wc-ev-settings-email.php:128

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: wpcodefactory, omardabbas, karzin, anbinder, kousikmukherjeeli, ae
33
Tags: woocommerce, email, verification, email verification, woo commerce
44
Requires at least: 4.4
55
Tested up to: 6.8
6-
Stable tag: 3.1.2
6+
Stable tag: 3.1.3
77
License: GNU General Public License v3.0
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -355,6 +355,9 @@ Once activated, access the plugin's settings by navigating to “WooCommerce > S
355355

356356
== Changelog ==
357357

358+
= 3.1.3 - 14/10/2025 =
359+
* Fix - Some verified users couldn't place orders when the email field is not present.
360+
358361
= 3.1.2 - 13/10/2025 =
359362
* Fix - Some verified users couldn't place orders when the email field is not present.
360363

0 commit comments

Comments
 (0)