I'm trying to write some code to sms me whenever someone updates/installs a plugin, or updates the WP core, but I can't seem to find a hook that gets fired when this happens. Does anyone know if there are any hooks that I can plug into that will get fired when this happens?



2 Answers 2


A chance is the update_feedback filter hook. He is usable after core and plugin update, I think. You can hook in and start your custom doing. See the follow example, but only a code for understand my bad english; he don't work.

add_filter( 'update_feedback', 'fb_add_feedback' );
function fb_add_feedback( $feedback ) {

    // start my custom fuction for remove plugin foo

    return $feedback;

Also look at the upgrader_post_install hook. It's at the end of the install_package function, see also the rather bland WP developer page on this hook -- but of course you'll want to run tests yourself to ensure this hook indeed fires when WP core, any plugin, or any theme is upgraded.

In general, I'm finding Adam Brown's WP hooks database the most comprehensive resource to learn about WP's hooks (and how these change over each WP version). But it comes with zero documentation, so you've got to rely on the hook names and browsing through the relevant source code in order to understand what they're for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.