Setup: WordPress with WooCommerce 11.0.0 and your plugin handling double opt-in at registration.
WooCommerce 11.0 introduced
AutomatticWooCommerceInternalCustomerEmailVerification. It renders a prompt on My Account → Orders (hooked towoocommerce_before_account_orders) for every logged-in customer whose address WooCommerce does not consider verified. Its state is entirely separate from yours, and there is no filter to disable the prompt.The result: a customer who already completed your double opt-in is asked a second time, by a different system, to confirm the same address. It looks broken and it undermines trust in your actual verification email.
Suggestion: when your plugin marks a user as verified, report that to WooCommerce as well – guarded, because the class is internal:
$class = 'Automattic\WooCommerce\Internal\CustomerEmailVerification\EmailVerificationService';if ( function_exists( 'wc_get_container' ) && class_exists( $class ) ) {wc_get_container()->get( $class )->mark_verified( $user_id );}We are aware this depends on an internal class and have raised the missing public API with WooCommerce separately.
A related point while I have your attention: WooCommerce logs new customers in automatically after registration (
woocommerce_registration_auth_new_customer). We had to add our own filter to suppress that while verification is still pending. Handling this natively would remove custom code from every WooCommerce shop using your plugin.By the way - your layout seems to be broken in some way...
Best regards
Matthias
Subject: WooCommerce 11.0 ships its own email verification – customers are now asked twice
Ticket for: User Verification
0
Matthias Rieken
0 Subscribers
Submit Answer
0 Answers
