It is not checkmate if the other player has any legal move that gets them out of check. Capturing the checking piece is one such way; whether the capture is en passant or not is irrelevant for the purpose of this question.
In this case, thean en passant capture is the only legal move. If the other player didn't know about itthe en passant rule, I suppose they might lose on time unless they figure out what's going on first. Using a website such as chess.com one might be able to discover the rule accidentally, since clicking on a piece normally highlights all the possible moves for that piece.
Regarding your question of "what happens in the case the opponent plays some other piece", that would be an illegal move. A site such as chess.com simply won't allow it. In an over-the-board tournament, the consequence may vary: in blitz, the player who makes the illegal move loses; in long games, the move gets retracted and a time penalty is applied, at least for a first offense.