Please note that the wifi will only allow you to text via iMessage - i.e., to other iPhone users - or using non-text apps like Google Hangout, Facebook Messenger, etc. If you are trying to contact someone who doesn't have an iPhone, or trying to message them via their phone number, that is an SMS message and will not work over wifi.