diff --git a/WiFiManager.cpp b/WiFiManager.cpp index fac7af1..90a7970 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -304,6 +304,11 @@ bool WiFiManager::startAP(){ bool ret = true; DEBUG_WM(F("StartAP with SSID: "),_apName); + // do AP callback if set + if ( _apcallback != NULL) { + _apcallback(this); + } + // setup optional soft AP static ip config if (_ap_static_ip) { DEBUG_WM(F("Custom AP IP/GW/Subnet:")); @@ -347,11 +352,6 @@ bool WiFiManager::startAP(){ } #endif - // do AP callback if set - if ( _apcallback != NULL) { - _apcallback(this); - } - return ret; }