Deactivate a single plugin or multiple plugins.

The deactivation hook is disabled by the plugin upgrader by using the $silent parameter.

Signature

deactivate_plugins( $plugins, $silent = false, $network_wide = null )
plugins
 (string|array) Single plugin or list of plugins to deactivate.
silent
 (boolean) Prevent calling deactivation hooks. Default is false.
Default: false
network_wide
 (mixed) Whether to deactivate the plugin for all sites in the network. A value of null (the default) will deactivate plugins for both the site and the network.
Default: null

Return

(void)

Source

function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
	if ( is_multisite() )
		$network_current = get_site_option( 'active_sitewide_plugins', array() );
	$current = get_option( 'active_plugins', array() );
	$do_blog = $do_network = false;

	foreach ( (array) $plugins as $plugin ) {
		$plugin = plugin_basename( trim( $plugin ) );
		if ( ! is_plugin_active($plugin) )
			continue;

		$network_deactivating = false !== $network_wide && is_plugin_active_for_network( $plugin );

		if ( ! $silent ) {
			/**
			 * Fires before a plugin is deactivated.
			 *
			 * If a plugin is silently deactivated (such as during an update),
			 * this hook does not fire.
			 *
65 more lines...
WP Trac GitHub

Link here