WordPress.org

Ready to get started?Download WordPress

Forums

register_activation_hook & plugin upgrade (3 posts)

  1. Ajay
    Member
    Posted 4 years ago #

    Hi,

    I just wanted to know if register_activation_hook is executed when a user upgrades the plugin from within the WordPress Admin?

    Anyone with any ideas?

  2. willkemp
    Member
    Posted 4 years ago #

    I think so. It certainly deactivates it before it's upgraded, so it would seem likely that it's activated again afterwards.

    I've had a bit of a read through the code ( wp-admin/includes/class-wp-upgrader.php ), but it's a bit convoluted and not very well commented, and i haven't got time to read it thoroughly at the moment. I need to find this out myself though, so i'll have another go at it when i've got a bit more time.

  3. Ajay
    Member
    Posted 4 years ago #

    Thanks willkemp. I'm hoping to figure the same out as well, especially since users will upgrade the plugin and I hope that it works.

Topic Closed

This topic has been closed to new replies.

About this Topic