Self-deactivate plugin ?
-
Hi, i’m writing a plugin that uses his own table in the database. I want that, when the plugin is deactivated from the plugins list, the database is kept. Besides, i have add a button to the plugin options page to uninstall it properley, droping all tables. But I cannot find how to make my plugin deactivate himslef after that. I thought that would work, but it doesn’t:
$this->aixorder_deactivate(); //droping my tables (works, tested) $plugin = plugin_basename(__FILE__); do_action('deactivate_'.$plugin); //plugin is not deactivated, and i land on my plugins options page full of errors because my database table was dropped...
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Self-deactivate plugin ?’ is closed to new replies.