installedTier() === Tier::Free && current_user_can('install_plugins') // Spelled out rather than self::FILTER, so Plugin Check can see the prefix. && (bool) apply_filters('wconvert_show_pro_hints', true); } /** * @param array|null $plugins `get_plugins()`, passed by tests. */ public static function proInstalledInactive(ProPresence $pro, ?array $plugins = null): bool { if ($pro->installedTier() !== Tier::Free || !current_user_can('activate_plugins')) { return false; } if ($plugins === null) { if (!function_exists('get_plugins')) { $file = ABSPATH . 'wp-admin/includes/plugin.php'; if (!is_file($file)) { return false; } require_once $file; } $plugins = get_plugins(); } // Free is running without Pro's constant, so a Pro file here is one WordPress has not loaded. return isset($plugins[self::PRO_PLUGIN]); } }