No. John Stamos does not appear in Alice Through the Looking Glass (2010 or 2016).
You may be thinking of Johnny Depp, who plays the Mad Hatter in Tim Burton's 2010 film and its sequel.