Try this:
FString PluginName = "MyPlugin";
FString LatestVersion = "1.4.1";
IPluginManager& PluginManager = IPluginManager::Get();
TArray<TSharedRef<IPlugin>> Plugins = PluginManager.GetDiscoveredPlugins();
for(const TSharedRef<IPlugin>& Plugin: Plugins) {
if (Plugin.GetName() == PluginName) {
const FPluginDescriptor& Descriptor = Plugin->GetDescriptor();
if (Descriptor.VersionName != LatestVersion) {
// Invoke your update code here
}
}
}
For an example, have a look at the end of this file: https://github.com/EpicGames/UnrealEngine/blob/f8f4b403eb682ffc055613c7caf9d2ba5df7f319/Engine/Source/Editor/ContentBrowser/Private/NativeClassHierarchy.cpp