At least one flight I took this year with either Ryanair or EasyJet had in-flight WiFi - it could only be used to access the in-flight duty free menu and some advertising for the airline/destination, but nevertheless suggests they have internet access which could presumably be used for processing card transactions (these use very little bandwidth). If not, and they're using them offline, the risk of a card declining post-landing is presumably reduced by the fact that they can record which seat numbers order what, and then chase up any customers whose payment doesn't go through.
I was hoping my easyJet flight was one of these with it, but alas it wasn't. Was going to have a snoop round it.
I believe, from what they say in their duty free menu thing and online on easyJet at least, that it's just a "local" wifi network, there's no internet connection at all, your devices just talk to a local Wifi AP / very expensive "aircraft grade" raspberry pi... The advertising is almost certainly cached locally too.
easyJet actually state that the card payments are processed "offline". My Barclaycard actually got declined (surprisingly), but Monzo via Google Pay all fine and went through first time.