includes/class-freemius.php
function is_trial_plan( $plan, $exact = false ) {
            $this->_logger->entrance();

            if ( ! $this->is_registered() ) {
                return false;
            }

            if ( ! $this->is_trial() ) {
                return false;
            }

            $trial_plan = $this->get_trial_plan();

            if ( $trial_plan->name === $plan ) {
                // Exact plan.
                return true;
            } else if ( $exact ) {
                // Required exact, but plans are different.
                return false;
            }

            $current_plan_order  = - 1;
            $required_plan_order = - 1;
            for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
                if ( $plan === $this->_plans[ $i ]->name ) {
                    $required_plan_order = $i;
                } else if ( $trial_plan->name === $this->_plans[ $i ]->name ) {
                    $current_plan_order = $i;
                }
            }

            return ( $current_plan_order > $required_plan_order );
        }
function is_trial_plan( $plan, $exact = false ) {
            $this->_logger->entrance();

            if ( ! $this->is_registered() ) {
                return false;
            }

            if ( ! $this->is_trial() ) {
                return false;
            }

            $trial_plan = $this->get_trial_plan();

            if ( $trial_plan->name === $plan ) {
                // Exact plan.
                return true;
            } else if ( $exact ) {
                // Required exact, but plans are different.
                return false;
            }

            $current_plan_order  = - 1;
            $required_plan_order = - 1;
            for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
                if ( $plan === $this->_plans[ $i ]->name ) {
                    $required_plan_order = $i;
                } else if ( $trial_plan->name === $this->_plans[ $i ]->name ) {
                    $current_plan_order = $i;
                }
            }

            return ( $current_plan_order > $required_plan_order );
        }
function is_trial_plan ( $ plan , $ exact = false ) { $ this -> _logger -> entrance ( ) ; if ( ! $ this -> is_registered ( ) ) { return false ; } if ( ! $ this -> is_trial ( ) ) { return false ; } $ trial_plan = $ this -> get_trial_plan ( ) ; if ( $ trial_plan -> name === $ plan ) { // Exact plan.
 return true ; } else if ( $ exact ) { // Required exact, but plans are different.
 return false ; } $ current_plan_order = - 1 ; $ required_plan_order = - 1 ; for ( $ i = 0 , $ len = count ( $ this -> _plans ) ; $ i < $ len ; $ i ++ ) { if ( $ plan === $ this -> _plans [ $ i ] -> name ) { $ required_plan_order = $ i ; } else if ( $ trial_plan -> name === $ this -> _plans [ $ i ] -> name ) { $ current_plan_order = $ i ; } } return ( $ current_plan_order > $ required_plan_order ) ; }
Check if plan based on trial. If not in trial mode, should return false.

@since  1.0.9

@param string $plan  Plan name
@param bool   $exact If true, looks for exact plan. If false, also check "higher" plans.

@return bool
Check if plan based on trial . If not in trial mode should return false .