Automattic\WooCommerce\StoreApi

SessionHandler::get_session_datapublicWC 1.0

Get session data fresh from storage.

This re-reads session data from the database rather than returning in-memory data, ensuring the latest persisted state is returned.

Method of the class: SessionHandler{}

No Hooks.

Returns

Array.

Usage

$SessionHandler = new SessionHandler();
$SessionHandler->get_session_data();

SessionHandler::get_session_data() code WC 10.8.1

public function get_session_data() {
	return $this->has_session() ? (array) $this->get_session( $this->get_customer_id(), array() ) : array();
}