src/MocaBonita.php
public static function deactive(\Closure $deactive)
    {
        $mocaBonita = self::getInstance();

        register_deactivation_hook(MbPath::pBaseN(), function () use ($deactive, $mocaBonita) {
            try {
                MbMigration::enablePdoConnection();
                call_user_func_array($deactive, [$mocaBonita]);
            } catch (\Exception $e) {
                MbException::registerError($e);
                wp_die($e->getMessage());
            }
        });
    }
public static function deactive(\Closure $deactive)
    {
        $mocaBonita = self::getInstance();

        register_deactivation_hook(MbPath::pBaseN(), function () use ($deactive, $mocaBonita) {
            try {
                MbMigration::enablePdoConnection();
                call_user_func_array($deactive, [$mocaBonita]);
            } catch (\Exception $e) {
                MbException::registerError($e);
                wp_die($e->getMessage());
            }
        });
    }
public static function deactive ( \ Closure $ deactive ) { $ mocaBonita = self :: getInstance ( ) ; register_deactivation_hook ( MbPath :: pBaseN ( ) , function ( ) use ( $ deactive , $ mocaBonita ) { try { MbMigration :: enablePdoConnection ( ) ; call_user_func_array ( $ deactive , [ $ mocaBonita ] ) ; } catch ( \ Exception $ e ) { MbException :: registerError ( $ e ) ; wp_die ( $ e -> getMessage ( ) ) ; } } ) ; }
Set the callback that will be called when the plugin is deactivated

@param $deactive \Closure Callback that will be called

@return void
Set the callback that will be called when the plugin is deactivated