WC_Session_Handler::is_customer_guest │ private │ WC 1.0

Checks if this is an auto-generated customer ID.

Method of the class: WC_Session_Handler{}

No Hooks.

Returns

bool. 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 11.1.2

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