src/WP_Session.php
public function hooks() {
		// Start and commit the session.
		add_action( 'plugins_loaded', [ $this, 'start_session' ] );
		add_action( 'shutdown', [ $this, 'commit_session' ] );

		// Register the garbage collector.
		add_action( 'wp', [ $this, 'register_garbage_collection' ] );
		add_action( $this->get_schedule_name(), [ $this, 'cleanup_expired_sessions' ] );
	}
public function hooks() {
		// Start and commit the session.
		add_action( 'plugins_loaded', [ $this, 'start_session' ] );
		add_action( 'shutdown', [ $this, 'commit_session' ] );

		// Register the garbage collector.
		add_action( 'wp', [ $this, 'register_garbage_collection' ] );
		add_action( $this->get_schedule_name(), [ $this, 'cleanup_expired_sessions' ] );
	}
public function hooks ( ) { // Start and commit the session. add_action ( 'plugins_loaded' , [ $ this , 'start_session' ] ) ; add_action ( 'shutdown' , [ $ this , 'commit_session' ] ) ; // Register the garbage collector. add_action ( 'wp' , [ $ this , 'register_garbage_collection' ] ) ; add_action ( $ this -> get_schedule_name ( ) , [ $ this , 'cleanup_expired_sessions' ] ) ; }
Hooks into WordPress to start, commit and run garbage collector.

@return void
Hooks into WordPress to start commit and run garbage collector .