Both are correct, though was is frowned upon by some as less elegant. The rule is to change 'was' to 'were' after the verb 'wish' and in if -clauses attached to a main clause with would . Mary wish es she was smarter becomes Mary wishes she were smarter .
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.