public static function getPluginWarnings() { $problemPlugins = array(); $problemPlugins["W3 Total Cache"] = "w3-total-cache/w3-total-cache.php"; $problemPlugins["WP Super Cache"] = "wp-super-cache/wp-cache.php"; $plugins = get_option('active_plugins'); foreach ($problemPlugins as $name => $location) { if (in_array($location, $plugins)) { if (!MM_Messages::isMessageHidden($location)) { $hideWarningUrl = MM_Messages::getHideMessageUrl(self::constructPageUrl(), $location); MM_Messages::addError("<i class=\"fa fa-exclamation-triangle\"></i> <strong>MemberMouse Warning</strong>: The <em>{$name}</em> plugin is known to cause issues with MemberMouse. <a href='https://membermouse.uservoice.com/knowledgebase/articles/319203-plugins-that-cause-problems' target='_blank'>Learn more</a> | <a href='{$hideWarningUrl}'>Hide this warning</a>"); } } } // check if client is using Visual Composer $visualComposerPlugin = "js_composer/js_composer.php"; if (in_array($visualComposerPlugin, $plugins)) { if (!MM_Messages::isMessageHidden($visualComposerPlugin)) { $hideWarningUrl = MM_Messages::getHideMessageUrl(self::constructPageUrl(), $visualComposerPlugin); $visualEditorMsg = "<p><i class=\"fa fa-exclamation-triangle\"></i> <strong>MemberMouse Warning: Visual Composer</strong></p>"; $visualEditorMsg .= "<div style=\"margin-left:20px;\"><i class=\"fa fa-caret-right\"></i> "; $visualEditorMsg .= "You're using Visual Composer. To avoid issues make sure to follow the instructions in this article when <a href='http://membermouse.uservoice.com/knowledgebase/articles/792249' target='_blank'>using SmartTags</a> | <a href='{$hideWarningUrl}'>Hide this warning</a>"; $visualEditorMsg .= "</div>"; MM_Messages::addError($visualEditorMsg); } } // check if client is using WP Engine if (class_exists("WPE_API", false) || defined("WPE_APIKEY") || defined("WPE_ISP")) { if (!MM_Messages::isMessageHidden("wp-engine-warning")) { $hideWarningUrl = MM_Messages::getHideMessageUrl(self::constructPageUrl(), "wp-engine-warning"); MM_Messages::addError("<i class=\"fa fa-exclamation-triangle\"></i> <strong>MemberMouse Warning</strong>: You're using WP Engine. Follow the instructions in this article to <a href='http://membermouse.uservoice.com/knowledgebase/articles/356866-configuring-wp-engine-hosting' target='_blank'>work with WP Engine to ensure your server is configured to allow MemberMouse to run properly</a>. | <a href='{$hideWarningUrl}'>Hide this warning</a>"); } } // TODO this code can be removed after no active license is on a version less than 2.2.4 $captchaSiteKey = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_CAPTCHA_KEY); $captchaPrivateKey = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_CAPTCHA_PRIVATE_KEY); $mmVersion = MemberMouse::getPluginVersion(); // check if client is using recaptcha and on version 2.2.4 of MM if ($mmVersion == "2.2.4" && !empty($captchaSiteKey) && !empty($captchaPrivateKey)) { if (!MM_Messages::isMessageHidden("recaptcha-upgrade-warning")) { $hideWarningUrl = MM_Messages::getHideMessageUrl(self::constructPageUrl(), "recaptcha-upgrade-warning"); MM_Messages::addError("<div style='width:750px;'><i class=\"fa fa-exclamation-triangle\"></i> <strong>MemberMouse Warning</strong>: It appears that you're currently using reCaptcha. In this version of MemberMouse reCaptcha has been upgraded and your <strong>action is required</strong> to ensure your checkout process continues to function correctly. <a href='http://membermouse.uservoice.com/knowledgebase/articles/718512#recaptcha-upgrade' target='_blank'>Watch this video for details</a>. | <a href='{$hideWarningUrl}'>Hide this warning</a></div>"); } } }