WordPress.org

Ready to get started?Download WordPress

Codex

Plugin API/Action Reference/deactivated plugin

This page is marked as incomplete. You can help Codex by expanding it.

Description

This hook is run immediately after any plugin is deactivated, and may be used to detect the deactivation of other plugins.

Example

function detect_plugin_deactivation(  $plugin, $network_activation ) {
    // do stuff
}
add_action( 'deactivated_plugin', 'detect_plugin_deactivation', 10, 2 );

Related

  • Action: activated_plugin - runs when any plugin is activated
  • Action: deactivated_plugin - runs when any plugin is deactivated