WC_Session_Handler::is_customer_guestprivateWC 1.0

Checks if this is an auto-generated customer ID.

Method of the class: WC_Session_Handler{}

No Hooks.

Returns

true|false. Whether customer ID is randomly generated.

Usage

// private - for code of main (parent) class only
$result = $this->is_customer_guest( $customer_id );
$customer_id(string) (required)
Customer ID to check.

WC_Session_Handler::is_customer_guest() code WC 10.3.3

private function is_customer_guest( $customer_id ) {
	return empty( $customer_id ) || 't_' === substr( $customer_id, 0, 2 );
}