Yes, there is a hook you can use, it’s called upgrader_process_complete
. This hook fires after plugins or core has been upgraded.
You can hook to this action and send an email:
function send_custom_email( $object, $options ) {
// Get the path for plugins
$plugin_path = plugin_basename( __FILE__ );
// Check if the plugin is upgraded
if ($options['type'] == 'plugin' && $options['action'] == 'update' ){
foreach($options['packages'] as $plugin){
if ($plugin == $plugin_path){
// Do some stuff here
}
}
}
}
add_action( 'upgrader_process_complete', 'send_custom_email',10, 2);
This function allows you to do whatever you want whenever a plugin is updated. You can do so with the core updates, too.
Related Posts:
- Preventing a plugin from updating
- Filter Hook on plugin update
- Hook (upgrader_process_complete) running moment
- Updates for a private plugin?
- to perform the requested action wordpress needs to access your web server. please enter your ftp
- Disable update notification for individual plugins
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I stop WordPress from prompting me to enter FTP information when doing updates?
- How can I edit post data before it is saved?
- How can I see all the actions attached to an “add_action” hook?
- what is the correct way to update a plugin via tortoise svn to the repository?
- Registering Class methods as hook callbacks
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- How to customize woocommerce related products? [closed]
- Can I upgrade a plugin to a specific version?
- How to include code only on specific pages?
- How to implement WordPress plugin update that modifies the database?
- Changing the “Plugin Activated” Message Default
- Hooking in to plugins
- How to create custom message on plugin update
- What are the best practices for updating?
- Generate dormant hook references
- Update plugin from personal API
- Schedule WordPress Auto-Updates to only run during business hours
- Better to fire specific hooks or generic hooks with parameters?
- Why “Contact Form 7” doesn’t update PHPmailer library?
- Can’t install new plugins because of the error “Could not create directory”
- How to only hook on Single.php after content?
- Remove action from plugin on other plugin
- Removing the “Your backup folder MIGHT be visible to the public” Message Generated by the WP-DBManager Plugin
- Why does wp_enqueue_style() in plugin not load stylesheet?
- How to create a WordPress plugin for another wordpress plugin?
- Managing WP Core & Plugin Updates for Clients
- Error when updating plugins by FTP “Unable to locate WordPress Content directory (wp-content).”
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Plugin update error message
- Is there any debug toolbar that shows whick hooks are called for the current page in WordPress?
- When can you get current page ID and initialize hooks right after?
- Customize plugin update “new version is available” text
- Customizing subject in comment notification e-mails
- How to save the values of checkbox to the register setting?
- Can we hook a static method of a class to add_action inside that class?
- Edit plugin without hooks in functions.php
- Get Latest Plugin Version from WP API
- Which files get updated in a plugin update?
- How can I log a user out of WordPress before the page loads?
- How wordpress detects a plugin update
- What is the ‘admin_action_’ . $_REQUEST[‘action’] hook used for?
- WP showing “warning: call_user_func_array()”, What to do?
- Filter out results from REST API
- A Way to Auto update plugins using cron?
- How can I remove a hooked action created by a plugin?
- Overwrite textdomain of plugins by default – Lost Translation
- WordPress admin notice in plugin function
- Plugin updates are not shown
- Using the ‘draft_to_publish’ hook (post status transition)
- Updating WordPress – the best approach (updating wp core, plugins and db)
- Remove update messages for deactivated plugins
- How get list of updates of wp site?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Modify featured image URL at runtime
- WordPress Hook that will run when media file deleted
- plugin wants to update to wrong plugin
- Seeking clarification on page request life-cycle
- How to update WordPress plugin readme.txt description page without triggering a plugin update?
- Disallow a user to post in certain categories
- Intercepting a add_action
- Generic plugin (de)activation hook?
- How to notify users of blog updates a la Admin Plugin Update notifications?
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- How can a plugin run a script after being updated in MultiSite?
- Which hook should be used to validate custom form fields on the login form?
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- Automatic updates not working/plugins not installing
- How to update plugin without overwrite custom code
- disable active plugins for specific theme
- Twillio How To Send SMS for Custom Post Type
- What Triggers a Plugin Update Alert
- Adding a form at the end of the content
- WordPress plugin search does not work and updates are not shown, VPS install
- Hide WordPress Plugin Deactivation Links
- Find out if request is for custom post type archive before query runs
- Use external link in the add sub menu
- Pass A Value From Outside To A Plugin Variable
- Built in admin ajax hooks?
- Failed to invoke other hook from the init hook
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- How do I prevent Plugin updates from clobbering user edits?
- Force wordpress to request for FTP Info on theme/plugin install/update
- How can I add a custom meta value on file upload?
- Adding dynamic section to WordPress
- Under which circumstances is the .maintenance file not deleted?
- Why users disable the WordPress update?
- do_action and hook methods
- Plugin child folder?
- Upgrading WordPress 4.0 asks for FTP password
- the_posts hook, which set of posts?
- How can I filter blog name?
- why does the add_action(‘the_content’) overwrite my page