session = $session; } public function register_hook() { add_action( 'wp_logout', [ $this->session, 'destroy' ], 10, 0 ); } }