My parents-in-law changed over their WiFi and their router. So the wireless printer stopped working. The solution was simple – we just needed to connect the printer to the new WiFi using the latest ssid and key (password).
Being a Canon MG7160 the first step was to swipe left or right on the printer touchscreen at WLAN, then Wireless LAN Setup > Standard Setup > and the ssid. Enter passphrase. Now the printer can connect to the WiFi and you can print to it over the WiFi.