register_activation_hook not firing
-
I’m creating a plugin and I have some functionality that I want to fire when it is activated for the first time. I’ve tried a couple different methods to have my code fire on this event.
1. In an object I define, I tried
register_activation_hook(__FILE__, array(&$this, 'funcname'))
and having myfunction funcname()
in said object as well. This is inside the core file for my plugin.2. I tried moving my functionality out of the object.
register_activation_hook(__FILE__, 'funcname')
and having my function funcname be outside of my object as well.3. I tried bypassing the register_activation_hook function and calling
add_action('activate_'.path_to_my_plugin, 'funcname')
directly.Any idea of what might be causing this, or anyone have anything I should check? I’m copying the functionality straight from the documentation as far as I can see.
Thanks
- The topic ‘register_activation_hook not firing’ is closed to new replies.