In-flight wifi is fairly easy to control. I won't say how but in most cases the pax just think it's a service outage, not that it's been switched off. There is more than one way to control it but like many things, the flight deck usually have some ability to control this.