Automattic\WooCommerce\Internal\Features
FeaturesController::handle_plugin_deactivation
Handle the plugin deactivation hook.
Method of the class: FeaturesController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$FeaturesController = new FeaturesController(); $FeaturesController->handle_plugin_deactivation( $plugin_name ): void;
- $plugin_name(string) (required)
- Name of the plugin that has been deactivated.
FeaturesController::handle_plugin_deactivation() FeaturesController::handle plugin deactivation code WC 10.3.3
public function handle_plugin_deactivation( $plugin_name ): void {
unset( $this->compatibility_info_by_plugin[ $plugin_name ] );
foreach ( array_keys( $this->compatibility_info_by_feature ) as $feature ) {
$compatibles = $this->compatibility_info_by_feature[ $feature ][ FeaturePluginCompatibility::COMPATIBLE ];
$this->compatibility_info_by_feature[ $feature ][ FeaturePluginCompatibility::COMPATIBLE ] = array_diff( $compatibles, array( $plugin_name ) );
$incompatibles = $this->compatibility_info_by_feature[ $feature ][ FeaturePluginCompatibility::INCOMPATIBLE ];
$this->compatibility_info_by_feature[ $feature ][ FeaturePluginCompatibility::INCOMPATIBLE ] = array_diff( $incompatibles, array( $plugin_name ) );
}
}