*/ class A1AI_Upgrade_Helper { /** * Check if the upgrade plugin is active * * Checks multiple possible installation paths for the upgrade plugin * * @since 1.0.0 * @return bool True if upgrade plugin is active, false otherwise */ public static function is_upgrade_active() { // Possible plugin paths $upgrade_paths = array( 'a1ai-chatbot-upgrade/a1ai-chatbot-upgrade.php', 'a1ai-chatbot-upgrade-new/a1ai-chatbot-upgrade.php', 'a1ai-chatbot-upgrade-new-x/a1ai-chatbot-upgrade.php' ); // Check if is_plugin_active function exists if (!function_exists('is_plugin_active')) { include_once(ABSPATH . 'wp-admin/includes/plugin.php'); } // Check each possible path foreach ($upgrade_paths as $path) { if (function_exists('is_plugin_active') && is_plugin_active($path)) { return true; } } return false; } }