6

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?

1 Answer 1

3

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.