I have never tried to do what you are trying to do, so no promises, but there is an action hook called upgrader_process_complete
in the upgrade
method of the Theme_Upgrader
class, and it look like it would do what you want. The action is called like:
do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'theme' ), $theme )
So it looks like that $this
parameter should have the information you need.
There is also an upgrader_post_install
hook in the parent WP_Upgrader
class. That might be useful.