Automattic\WooCommerce\Internal\CustomerEmailVerification

EmailVerificationService::get_account_emailprivateWC 1.0

The user's account email, lower-cased, or null when the user does not exist.

Lower-casing here is the single normalisation point, so the verified-status match and the key's email-binding hash stay consistent however the address was capitalised.

Метод класса: EmailVerificationService{}

Хуков нет.

Возвращает

Строку|null.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_account_email( $user_id ): ?string;
$user_id(int) (обязательный)
WordPress user ID.

Код EmailVerificationService::get_account_email() WC 11.0.1

private function get_account_email( int $user_id ): ?string {
	$user = get_user_by( 'id', $user_id );

	return $user instanceof \WP_User ? strtolower( $user->user_email ) : null;
}