session_storage = $session_storage; $this->scheduler = $scheduler; } public function register_hook() { $hook = 'twofas_light_delete_expired_sessions'; $this->scheduler->weekly( $hook ); add_action( $hook, [ $this->session_storage, 'delete_expired_sessions' ] ); } }