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