Stuck on maintenance mode

Since you are using the W3 total cache plugin, So The HTML code will be cached in the wp-content/cache folder. So Delete Cache folder from wp-content directory.

Now remove the function activate_maintenance_mode() and check the site now…

If the problem exists , Delete the W3 total Cache Constant from wp-config.php and clear your browser data and check the site.