Is it possible to register_activation_hook() outside of the main file?
-
I’ve got activation and deactivation hooks that I want to move into their own file from the main plugin file. The problem that I am running into is that they don’t work when I move them. In my main.php file I have:
require_once plugin_dir_path(__FILE__) . 'activate-deactivate.php';
but it is useless. If it has to stay in the main file with the headers then I will except that.
I used this source and modified option A as a template.
https://wordpress.stackexchange.com/questions/25910/uninstall-activate-deactivate-a-plugin-typical-features-how-toAny help on the topic would be appreciated
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Is it possible to register_activation_hook() outside of the main file?’ is closed to new replies.