If  you’re a plugin or theme developer and would like to extend the features of Companion Auto Update you can do so by using custom action hooks and filters. If you have any idea on new hooks that should be added to this plugin please reach out to me and I’ll see what I can do.

Using hooks

If you use a hook to add or manipulate code, you can add your custom code in a variety of ways:

  • To a custom child theme’s functions.php file.
  • Using a plugin such as Code Snippets.

Action Hook:
After plugin updates

This function runs after a plugin has been succesfully updated.

function your_function() {
     // Your custom code goes here 
}
add_action( 'cau_after_plugin_update', 'your_function' );

Action Hook:
After theme updates

This function runs after a theme has been succesfully updated.

function your_function() {
     // Your custom code goes here 
}
add_action( 'cau_after_plugin_update', 'your_function' );

Action Hook:
After core updates

This function runs after the core has been succesfully updated.

function your_function() {
     // Your custom code goes here 
}
add_action( 'cau_after_core_update', 'your_function' );