includes/class-freemius.php
private function _sync_site_subscription( $license ) {
            if ( ! is_object( $license ) ) {
                $this->delete_unused_subscriptions();

                return false;
            }

            // Load subscription details if not lifetime.
            $subscription = $license->is_lifetime() ?
                false :
                $this->_fetch_site_license_subscription();

            if ( is_object( $subscription ) && ! isset( $subscription->error ) ) {
                $this->store_subscription( $subscription );
            } else {
                $this->delete_unused_subscriptions();
            }

            return $subscription;
        }
private function _sync_site_subscription( $license ) {
            if ( ! is_object( $license ) ) {
                $this->delete_unused_subscriptions();

                return false;
            }

            // Load subscription details if not lifetime.
            $subscription = $license->is_lifetime() ?
                false :
                $this->_fetch_site_license_subscription();

            if ( is_object( $subscription ) && ! isset( $subscription->error ) ) {
                $this->store_subscription( $subscription );
            } else {
                $this->delete_unused_subscriptions();
            }

            return $subscription;
        }
private function _sync_site_subscription ( $ license ) { if ( ! is_object ( $ license ) ) { $ this -> delete_unused_subscriptions ( ) ; return false ; } // Load subscription details if not lifetime.
 $ subscription = $ license -> is_lifetime ( ) ? false : $ this -> _fetch_site_license_subscription ( ) ; if ( is_object ( $ subscription ) && ! isset ( $ subscription -> error ) ) { $ this -> store_subscription ( $ subscription ) ; } else { $ this -> delete_unused_subscriptions ( ) ; } return $ subscription ; }
Sync site's subscription.

@author Vova Feldman (@svovaf)
@since  1.0.9

@param FS_Plugin_License|null $license

@return bool|\FS_Subscription
Sync site s subscription .