WC_Session_Handler::has_session()publicWC 1.0

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

Метод класса: WC_Session_Handler{}

Хуков нет.

Возвращает

true|false.

Использование

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

Код WC_Session_Handler::has_session() WC 8.7.0

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