Is deactivate_plugins necessary on register_activation_hook wp check version?
-
Hello everybody,
I see that deactivate_plugins is not working inside the hook register_activation_hook.
Probably because the plugin is not active yet.
So I have to use wp_die in order to avoid the plugin to be activated.
But in this way is there a point to use deactivate_plugins?register_activation_hook( __FILE__ , 'xxx_activate_plugin'); function xxx_activate_plugin(){ if(version_compare( get_bloginfo( 'version' ), '7', '<')){ deactivate_plugins( plugin_basename( __FILE__ ) ); // useless? wp_die('some text'); } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Is deactivate_plugins necessary on register_activation_hook wp check version?’ is closed to new replies.