register_activation_hook and updating

register_activation_hook() is only called when the user activates the plugin. It is not called after a plugin upgrade.

The preferred method of handling upgrades is using register_activation_hook() to store the current version in the wp_options table and then checking it on each admin page load.

Leave a Comment