Just kidding. Nothing was actually hacked.
But in real life, connecting to random "free" Wi-Fi networks is one of the easiest ways for bad actors to snoop on what you're doing online. Same goes for clicking on links you don't recognize.
Rule of thumb: if you don't recognize a Wi-Fi network or a link, ask Mr. Avery before connecting.