Automattic\WooCommerce\Internal\CustomerEmailVerification

EmailVerificationService::clear_verificationpublicWC 11.0.0

Clear the email-verification status for the given user.

Removes both the verified-email meta and any pending verification key, effectively resetting the user to an unverified state.

Method of the class: EmailVerificationService{}

No Hooks.

Returns

void. Nothing (null).

Usage

$EmailVerificationService = new EmailVerificationService();
$EmailVerificationService->clear_verification( $user_id ): void;
$user_id(int) (required)
WordPress user ID.

Changelog

Since 11.0.0 Introduced.

EmailVerificationService::clear_verification() code WC 11.0.1

public function clear_verification( int $user_id ): void {
	Users::delete_site_user_meta( $user_id, self::VERIFIED_META );
	Users::delete_site_user_meta( $user_id, self::KEY_META );
}