I’ve done quite a bit of searching. I’m looking for hook/action called after a theme update. I know the initialization one – but a basic update? Cannot seem to find.
If one does not exist, how can you run a function after auto-updating?
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.