includes/class-freemius.php
private function _delete_plans( $store = true, $keep_associated_plans = true ) {
            $this->_logger->entrance();

            $plans = self::get_all_plans( $this->_module_type );

            $plans_to_keep = array();

            if ( $keep_associated_plans ) {
                $plans_ids_to_keep = $this->get_plans_ids_associated_with_installs();
                foreach ( $plans_ids_to_keep as $plan_id ) {
                    $plan = self::_get_plan_by_id( $plan_id );
                    if ( is_object( $plan ) ) {
                        $plans_to_keep[] = $plan;
                    }
                }
            }

            if ( ! empty( $plans_to_keep ) ) {
                $plans[ $this->_slug ] = $plans_to_keep;
            } else {
                unset( $plans[ $this->_slug ] );
            }

            $this->set_account_option( 'plans', $plans, $store );
        }
private function _delete_plans( $store = true, $keep_associated_plans = true ) {
            $this->_logger->entrance();

            $plans = self::get_all_plans( $this->_module_type );

            $plans_to_keep = array();

            if ( $keep_associated_plans ) {
                $plans_ids_to_keep = $this->get_plans_ids_associated_with_installs();
                foreach ( $plans_ids_to_keep as $plan_id ) {
                    $plan = self::_get_plan_by_id( $plan_id );
                    if ( is_object( $plan ) ) {
                        $plans_to_keep[] = $plan;
                    }
                }
            }

            if ( ! empty( $plans_to_keep ) ) {
                $plans[ $this->_slug ] = $plans_to_keep;
            } else {
                unset( $plans[ $this->_slug ] );
            }

            $this->set_account_option( 'plans', $plans, $store );
        }
private function _delete_plans ( $ store = true , $ keep_associated_plans = true ) { $ this -> _logger -> entrance ( ) ; $ plans = self :: get_all_plans ( $ this -> _module_type ) ; $ plans_to_keep = array ( ) ; if ( $ keep_associated_plans ) { $ plans_ids_to_keep = $ this -> get_plans_ids_associated_with_installs ( ) ; foreach ( $ plans_ids_to_keep as $ plan_id ) { $ plan = self :: _get_plan_by_id ( $ plan_id ) ; if ( is_object ( $ plan ) ) { $ plans_to_keep [ ] = $ plan ; } } } if ( ! empty ( $ plans_to_keep ) ) { $ plans [ $ this -> _slug ] = $ plans_to_keep ; } else { unset ( $ plans [ $ this -> _slug ] ) ; } $ this -> set_account_option ( 'plans' , $ plans , $ store ) ; }
Delete plugin's plans information.

@param bool $store                 Flush to Database if true.
@param bool $keep_associated_plans If set to false, delete all plans, even if a plan is associated with an install.

@author Vova Feldman (@svovaf)
@since  1.0.9
Delete plugin s plans information .