Notify When Update(s) Performed

51 views Asked by At

I'm looking to create a tally of the number of core, theme and plugin updates performed on a given WP installation. I envisage that this would involve creating an option into which I store and int value that is incremented every time a core, theme &/or plugin update is successfully performed.

To enable this I was hoping for some hooks are called when each of these update types are performed. However, I can't seem to find any relevant hooks for plugin and theme updates.

For core updates, it looks like I can simply increment the relevant options field whenever the '_core_updated_successfully' hook is called.

Are there any relevant hooks available for plugins and themes? Can you suggest an alternative methodology?

Thanks in advance.

1

There are 1 answers

2
Stubbies On BEST ANSWER

You can run the upgrader_process_complete action hook. it runs when the download process for a plugin install or update finishes. It takes a type parameter for core, plugin or theme.