I would like to run several actions on a website once WP core or any of the plugins have been updated using the built-in update process. Is there a way to do it?
I would prefer if I could run commands on 3 different cases:
after all of them have been finished)
The hooks you’re searching for are
The later takes three arguments. Example:
function upgrader_post_install_cb( $true, $hook_extra, $result )
and should be used for: Move & activate the plugin, echo the update message.
Moving works like this:
$wp_filesystem->move( $result['destination'] ,'your_destination_path' );
activate_plugin( 'path/file' ); after moving.