WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\Customers

DataStore::get_guest_id_by_email() public WC 1.0

Retrieve a guest ID (when user_id is null) by email.

{} It's a method of the class: DataStore{}

No Hooks.

Return

false|Array. Customer array if found, boolean false if not.

Usage

$result = DataStore::get_guest_id_by_email( $email );
$email(string) (required)
Email address.

Code of DataStore::get_guest_id_by_email() WC 5.2.2

<?php
public static function get_guest_id_by_email( $email ) {
	global $wpdb;

	$table_name  = self::get_db_table_name();
	$customer_id = $wpdb->get_var(
		$wpdb->prepare(
			// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
			"SELECT customer_id FROM {$table_name} WHERE email = %s AND user_id IS NULL LIMIT 1",
			$email
		)
	);

	return $customer_id ? (int) $customer_id : false;
}