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
- what is the correct way to update a plugin via tortoise svn to the repository?
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- Can I upgrade a plugin to a specific version?
- Changing the “Plugin Activated” Message Default
- Hooking in to plugins
- Better to fire specific hooks or generic hooks with parameters?
- Why “Contact Form 7” doesn’t update PHPmailer library?
- How to only hook on Single.php after content?
- 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?
- Which files get updated in a plugin update?
- What is the ‘admin_action_’ . $_REQUEST[‘action’] hook used for?
- Filter out results from REST API
- How can I remove a hooked action created by a plugin?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- plugin wants to update to wrong plugin
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- disable active plugins for specific theme
- Twillio How To Send SMS for Custom Post Type
- What Triggers a Plugin Update Alert
- Hide WordPress Plugin Deactivation Links
- Find out if request is for custom post type archive before query runs
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- do_action and hook methods
- Upgrading WordPress 4.0 asks for FTP password
- the_posts hook, which set of posts?
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- Over write plugin templates
- Determine plugin name from within plugin_action_links filter
- Override plugin functions in functions.php
- How to prevent action in ajax request, when in admin side?
- Easy Digital Downloads (EDD) – Purchase Receipt emails couldn’t be logged
- Placement of Code in Plugin for hooking `save_post`
- Can I use a method from an existing plugin as an action hook?
- Reposition Woocommerce Message
- Function to see how many plugins on a site need updating
- How to initialize something in unit test before the init hook being called?
- Where to hook my plugin’s action
- Prevent a plugin from being automatically activated
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- How get a value from a plugin into another plugin through action/filter
- Any hook for pre-plugin-update -either bulk or single plugin update
- Add custom message to the plugins page of WordPress
- How to update plugins with database updates if I use svn
- How do I display only the latest post on my home page, while maintaining proper plugin hooks?
- Hooking in to replace the Sidebar/Widget areas
- Modifying the comments section through a plugin regardless of theme
- wp_get_post_terms is difference obj model than the one in rest api response
- Get Time Taken By Each Action Hook in WordPress
- Best place for short bio,image and button [closed]
- Some recent plugin updates have failed “Could not create directory”
- The Hook registration_errors was not called
- What happens if I don’t update my plugins?
- My homemade plugin is trying to update to someone else’s plugin
- Why do plugins often ask to add in to templates?
- remove_action not removing add_action from constructor
- How to get menu location in wp_update_nav_menu hook
- Flipping Book PHP Code? Any experience?
- Display Plugin Panels Outside of Admin Areas
- Is there a maximum length to a WordPress Page?
- Save user total active time after login in wordpress [closed]
- Advanced WordPress plugin activation detection
- Updating WordPress across multiple versions
- How to return the values from a row where a value occurs for the first time among the rows available?
- How to add update function to plugin without adding it to https://wordpress.org/plugins/ [closed]
- How to hook into action/filter call
- How to automatically activate users after registration without activation email?
- Hooks to run after a core upgrade?
- Adding custom Field To The Posts Listing
- Add hook after content without formatting
- Using Remove Action Hook in Plugin
- admin_post hook not firing function inside class
- Unable to update plugins or log out
- Display Woocommerce attribute name above product title
- Gutenberg editor in WordPress 5.0.3 /wp-json/wp/v2/pages/4713/autosaves?_locale=user 500 (Internal Server Error)
- Update and remove buttons are hidden in plugin’s page
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- What is the correct entry point for capturing coverage data
- Pause form submissions while upgrading plugins
- Why all my wordpress sites keeps telling me that everything is up to date at /wp-admin/update-core.php?
- Publish check if the edited content has HTML “div”
- Run only on plug-in activation instead of wp_head
- Display_rows() and column_cb() strange behaviour
- add query string to all pages after user logged in
- How wordpress plugin hooks works? [duplicate]
- Post curl function save twice using plugin hook function wordpress
- Manually updating a plugin , is it overriding the previous settings of the plugin?
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Self-hosted Plugins & Themes store with auto-updates? [closed]
- Hook automatic_updates_complete to autoupdate plugin
- Console errors after WordPress Update 6.1
- Suitable hook when creating, updating and deleting posts programmatically
- How to Replicate Elementor Licensing Model
- Manually update notification of plugins needing updating
- On WordPress.org Plugin repository, Last Updated Date doesn’t match with Plugin Version Update Date
- is_user_logged_in() undefined at shutdown in plugin context
- What’s the best way to update my WordPress theme to Elementor?