includes/class-freemius.php
public function _after_site_deleted_callback( $context_blog_id = 0, $drop = false ) {
            $this->_logger->entrance();

            $install = $this->get_install_by_blog_id( $context_blog_id );

            if ( ! is_object( $install ) ) {
                // Site not connected.
                return;
            }

            $this->update_multisite_data_after_site_deactivation( $context_blog_id );

            $current_blog_id = get_current_blog_id();

            $this->switch_to_blog( $context_blog_id );

            if ( $drop ) {
                // Delete install if dropping site DB.
                $this->delete_account_event();
            } else {
                // Send deactivation event.
                $this->sync_install( array(
                    'is_active' => false,
                ) );
            }

            $this->switch_to_blog( $current_blog_id );
        }
public function _after_site_deleted_callback( $context_blog_id = 0, $drop = false ) {
            $this->_logger->entrance();

            $install = $this->get_install_by_blog_id( $context_blog_id );

            if ( ! is_object( $install ) ) {
                // Site not connected.
                return;
            }

            $this->update_multisite_data_after_site_deactivation( $context_blog_id );

            $current_blog_id = get_current_blog_id();

            $this->switch_to_blog( $context_blog_id );

            if ( $drop ) {
                // Delete install if dropping site DB.
                $this->delete_account_event();
            } else {
                // Send deactivation event.
                $this->sync_install( array(
                    'is_active' => false,
                ) );
            }

            $this->switch_to_blog( $current_blog_id );
        }
public function _after_site_deleted_callback ( $ context_blog_id = 0 , $ drop = false ) { $ this -> _logger -> entrance ( ) ; $ install = $ this -> get_install_by_blog_id ( $ context_blog_id ) ; if ( ! is_object ( $ install ) ) { // Site not connected.
 return ; } $ this -> update_multisite_data_after_site_deactivation ( $ context_blog_id ) ; $ current_blog_id = get_current_blog_id ( ) ; $ this -> switch_to_blog ( $ context_blog_id ) ; if ( $ drop ) { // Delete install if dropping site DB.
 $ this -> delete_account_event ( ) ; } else { // Send deactivation event.
 $ this -> sync_install ( array ( 'is_active' => false , ) ) ; } $ this -> switch_to_blog ( $ current_blog_id ) ; }
Executed after site deletion.

@author Vova Feldman (@svovaf)
@since  2.0.0

@param int  $context_blog_id
@param bool $drop True if site's database tables should be dropped. Default is false.
Executed after site deletion .