includes/class-freemius.php
private function _sync_license( $background = false, $is_context_single_site = false, $current_blog_id = null ) {
            $this->_logger->entrance();

            $plugin_id = fs_request_get( 'plugin_id', $this->get_id() );

            $is_addon_sync = ( ! $this->_plugin->is_addon() && $plugin_id != $this->get_id() );

            if ( $is_addon_sync ) {
                $this->_sync_addon_license( $plugin_id, $background );
            } else {
                $this->_sync_plugin_license( $background, true, $is_context_single_site, $current_blog_id );
            }

            $this->do_action( 'after_account_plan_sync', $this->get_plan_name() );
        }
private function _sync_license( $background = false, $is_context_single_site = false, $current_blog_id = null ) {
            $this->_logger->entrance();

            $plugin_id = fs_request_get( 'plugin_id', $this->get_id() );

            $is_addon_sync = ( ! $this->_plugin->is_addon() && $plugin_id != $this->get_id() );

            if ( $is_addon_sync ) {
                $this->_sync_addon_license( $plugin_id, $background );
            } else {
                $this->_sync_plugin_license( $background, true, $is_context_single_site, $current_blog_id );
            }

            $this->do_action( 'after_account_plan_sync', $this->get_plan_name() );
        }
private function _sync_license ( $ background = false , $ is_context_single_site = false , $ current_blog_id = null ) { $ this -> _logger -> entrance ( ) ; $ plugin_id = fs_request_get ( 'plugin_id' , $ this -> get_id ( ) ) ; $ is_addon_sync = ( ! $ this -> _plugin -> is_addon ( ) && $ plugin_id != $ this -> get_id ( ) ) ; if ( $ is_addon_sync ) { $ this -> _sync_addon_license ( $ plugin_id , $ background ) ; } else { $ this -> _sync_plugin_license ( $ background , true , $ is_context_single_site , $ current_blog_id ) ; } $ this -> do_action ( 'after_account_plan_sync' , $ this -> get_plan_name ( ) ) ; }
Sync site's plan.

@author Vova Feldman (@svovaf)
@since  1.0.3

@uses   FS_Api

@param bool $background             Hints the method if it's a background sync. If false, it means that was initiated by
the admin.
@param bool $is_context_single_site @since 2.0.0. This is used when syncing a license for a single install from the
network-level "Account" page.
@param int|null $current_blog_id    @since 2.2.3. This is passed from the `execute_cron` method and used by the
`_sync_plugin_license` method in order to switch to the previous blog when sending
updates for a single site in case `execute_cron` has switched to a different blog.
Sync site s plan .