WordPress at Your Fingertips
function is not described

WC_Session_Handler::has_session() public WC 1.0

Return true if the current user has an active session, i.e. a cookie to retrieve values.

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

No Hooks.

Return

true|false.

Usage

$WC_Session_Handler = new WC_Session_Handler();
$WC_Session_Handler->has_session();

Code of WC_Session_Handler::has_session() WC 5.9.0

public function has_session() {
	return isset( $_COOKIE[ $this->_cookie ] ) || $this->_has_cookie || is_user_logged_in(); // @codingStandardsIgnoreLine.
}