includes/class-freemius.php
private function send_installs_update( $override = array(), $flush = false ) {
            $this->_logger->entrance();

            $installs_data = $this->get_installs_data_for_api( $override, ! $flush );

            $keepalive_only_update = false;
            if ( empty( $installs_data ) ) {
                /**
                 * Pass `true` to use the network level storage since the update is for many installs.
                 *
                 * @author Leo Fajardo (@leorw)
                 * @since 2.2.3
                 */
                $keepalive_only_update = $this->should_send_keepalive_update( true );

                if ( ! $keepalive_only_update ) {
                    /**
                     * There are no updates to send including keepalive.
                     *
                     * @author Leo Fajardo (@leorw)
                     * @since 2.2.3
                     */
                    return false;
                }
            }

            if ( ! $keepalive_only_update ) {
                // Update last install sync timestamp if there were actual updates sent (i.e., not a keepalive-only call).
                $this->set_cron_execution_timestamp( 'install_sync' );
            }

            /**
             * Pass `true` to use the network level storage since the update is for many installs.
             *
             * @author Leo Fajardo (@leorw)
             * @since 2.2.3
             */
            $this->set_keepalive_timestamp( true );

            // Send updated values to FS.
            $result = $this->get_api_user_scope()->call( "/plugins/{$this->_plugin->id}/installs.json", 'put', $installs_data );

            if ( ! $keepalive_only_update && $this->is_api_result_object( $result, 'installs' ) ) {
                // I successfully sent installs update (there was an actual update sent and it's not just a keepalive-only call), clear scheduled sync if exist.
                $this->clear_install_sync_cron();
            }

            return $result;
        }
private function send_installs_update( $override = array(), $flush = false ) {
            $this->_logger->entrance();

            $installs_data = $this->get_installs_data_for_api( $override, ! $flush );

            $keepalive_only_update = false;
            if ( empty( $installs_data ) ) {
                /**
                 * Pass `true` to use the network level storage since the update is for many installs.
                 *
                 * @author Leo Fajardo (@leorw)
                 * @since 2.2.3
                 */
                $keepalive_only_update = $this->should_send_keepalive_update( true );

                if ( ! $keepalive_only_update ) {
                    /**
                     * There are no updates to send including keepalive.
                     *
                     * @author Leo Fajardo (@leorw)
                     * @since 2.2.3
                     */
                    return false;
                }
            }

            if ( ! $keepalive_only_update ) {
                // Update last install sync timestamp if there were actual updates sent (i.e., not a keepalive-only call).
                $this->set_cron_execution_timestamp( 'install_sync' );
            }

            /**
             * Pass `true` to use the network level storage since the update is for many installs.
             *
             * @author Leo Fajardo (@leorw)
             * @since 2.2.3
             */
            $this->set_keepalive_timestamp( true );

            // Send updated values to FS.
            $result = $this->get_api_user_scope()->call( "/plugins/{$this->_plugin->id}/installs.json", 'put', $installs_data );

            if ( ! $keepalive_only_update && $this->is_api_result_object( $result, 'installs' ) ) {
                // I successfully sent installs update (there was an actual update sent and it's not just a keepalive-only call), clear scheduled sync if exist.
                $this->clear_install_sync_cron();
            }

            return $result;
        }
private function send_installs_update ( $ override = array ( ) , $ flush = false ) { $ this -> _logger -> entrance ( ) ; $ installs_data = $ this -> get_installs_data_for_api ( $ override , ! $ flush ) ; $ keepalive_only_update = false ; if ( empty ( $ installs_data ) ) { /**
                 * Pass `true` to use the network level storage since the update is for many installs.
                 *
                 * @author Leo Fajardo (@leorw)
                 * @since 2.2.3
                 */ $ keepalive_only_update = $ this -> should_send_keepalive_update ( true ) ; if ( ! $ keepalive_only_update ) { /**
                     * There are no updates to send including keepalive.
                     *
                     * @author Leo Fajardo (@leorw)
                     * @since 2.2.3
                     */ return false ; } } if ( ! $ keepalive_only_update ) { // Update last install sync timestamp if there were actual updates sent (i.e., not a keepalive-only call).
 $ this -> set_cron_execution_timestamp ( 'install_sync' ) ; } /**
             * Pass `true` to use the network level storage since the update is for many installs.
             *
             * @author Leo Fajardo (@leorw)
             * @since 2.2.3
             */ $ this -> set_keepalive_timestamp ( true ) ; // Send updated values to FS.
 $ result = $ this -> get_api_user_scope ( ) -> call ( "/plugins/{$this->_plugin->id}/installs.json" , 'put' , $ installs_data ) ; if ( ! $ keepalive_only_update && $ this -> is_api_result_object ( $ result , 'installs' ) ) { // I successfully sent installs update (there was an actual update sent and it's not just a keepalive-only call), clear scheduled sync if exist.
 $ this -> clear_install_sync_cron ( ) ; } return $ result ; }
Update installs only if changed.

@author Vova Feldman (@svovaf)
@since  2.0.0

@param string[] string $override
@param bool     $flush

@return false|object|string
Update installs only if changed .