includes/class-freemius.php
private function get_plans_ids_associated_with_installs() {
            if ( ! $this->_is_network_active ) {
                if ( ! is_object( $this->_site ) ||
                     ! FS_Plugin_Plan::is_valid_id( $this->_site->plan_id )
                ) {
                    return array();
                }

                return array( $this->_site->plan_id );
            }

            $plan_ids = array();
            $sites    = self::get_sites();
            foreach ( $sites as $site ) {
                $blog_id = self::get_site_blog_id( $site );
                $install = $this->get_install_by_blog_id( $blog_id );

                if ( ! is_object( $install ) ||
                     ! FS_Plugin_Plan::is_valid_id( $install->plan_id )
                ) {
                    continue;
                }

                $plan_ids[ $install->plan_id ] = true;
            }

            return array_keys( $plan_ids );
        }
private function get_plans_ids_associated_with_installs() {
            if ( ! $this->_is_network_active ) {
                if ( ! is_object( $this->_site ) ||
                     ! FS_Plugin_Plan::is_valid_id( $this->_site->plan_id )
                ) {
                    return array();
                }

                return array( $this->_site->plan_id );
            }

            $plan_ids = array();
            $sites    = self::get_sites();
            foreach ( $sites as $site ) {
                $blog_id = self::get_site_blog_id( $site );
                $install = $this->get_install_by_blog_id( $blog_id );

                if ( ! is_object( $install ) ||
                     ! FS_Plugin_Plan::is_valid_id( $install->plan_id )
                ) {
                    continue;
                }

                $plan_ids[ $install->plan_id ] = true;
            }

            return array_keys( $plan_ids );
        }
private function get_plans_ids_associated_with_installs ( ) { if ( ! $ this -> _is_network_active ) { if ( ! is_object ( $ this -> _site ) || ! FS_Plugin_Plan :: is_valid_id ( $ this -> _site -> plan_id ) ) { return array ( ) ; } return array ( $ this -> _site -> plan_id ) ; } $ plan_ids = array ( ) ; $ sites = self :: get_sites ( ) ; foreach ( $ sites as $ site ) { $ blog_id = self :: get_site_blog_id ( $ site ) ; $ install = $ this -> get_install_by_blog_id ( $ blog_id ) ; if ( ! is_object ( $ install ) || ! FS_Plugin_Plan :: is_valid_id ( $ install -> plan_id ) ) { continue ; } $ plan_ids [ $ install -> plan_id ] = true ; } return array_keys ( $ plan_ids ) ; }
Get a collection of unique plan IDs that are associated with any installs in the network.

@author Leo Fajardo (@leorw)
@since  2.0.0

@return number[]
Get a collection of unique plan IDs that are associated with any installs in the network .