WC_Session::get_customer_idpublicWC 1.0

Get customer ID. If the session is not initialized, returns an empty string.

Method of the class: WC_Session{}

No Hooks.

Returns

String.

Usage

$WC_Session = new WC_Session();
$WC_Session->get_customer_id();

WC_Session::get_customer_id() code WC 10.6.2

public function get_customer_id() {
	return $this->_customer_id ?? '';
}