. */ if (!function_exists("ezKillLiteEZPP")) { if (!function_exists('is_plugin_active')) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; } function ezKillLiteEZPP($pro, $liteEZPP) { $proActive = is_plugin_active($pro); $liteActive = is_plugin_active($liteEZPP); if ($proActive && $liteActive) { add_action('init', function() { global $liteEZPP; deactivate_plugins($liteEZPP); }); printf('

'); printf(__("%s cannot be active now. Deactivating it so that you can use the Pro version %s If you really want to use the %s version, please deactivate the %s version first.", "easy-common"), "Easy PayPal Lite", "Easy PayPal Pro.
", "Lite", "Pro"); printf("
" . __("Please reload this page to remove stale links.", 'easy-common') . " "); printf('

'); add_action('admin_footer-plugins.php', function() { printf(''); }); } } } $pro = "$plgSlug/easy-paypal.php"; $liteEZPP = "easy-paypal-lte/easy-paypal-lite.php"; // to put it global scope if (class_exists("EzPayPal")) { $liteEZPP = "easy-paypal-lte/easy-paypal-lite.php"; ezKillLiteEZPP($pro, $liteEZPP); } if (class_exists("EzPayPalPro")) { $liteEZPP = "easy-paypal/easy-paypal.php"; ezKillLiteEZPP($pro, $liteEZPP); } // This works only because of the happy accident that p(ro) comes after l(ite) // So the if (class_exists("EzPayPal6")) { $liteEZPP = "ezpaypal-lite/easy-paypal.php"; ezKillLiteEZPP($pro, $liteEZPP); } // && $plgSlug != 'ezpaypal-pro'