: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @copyright Copyright (c) 2015, Freemius, Inc.
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
if ( ! defined( 'ABSPATH' ) ) {
* @property FS_Pricing[] $pricing
class FS_Plugin_Plan extends FS_Entity {
* @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
public $is_free_localhost;
* @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
public $is_block_features;
public $is_https_support;
* @var string If true, require payment for trial.
public $is_require_subscription;
* @var string Knowledge Base URL.
* @var string Support Forum URL.
* @var string Support email address.
* @var string Support phone.
* @var string Support skype username.
* @var bool Is personal success manager supported with the plan.
public $is_success_manager;
* @var bool Is featured plan.
* @param object|bool $plan
function __construct( $plan = false ) {
parent::__construct( $plan );
if ( is_object( $plan ) ) {
$this->name = strtolower( $plan->name );
static function get_type() {
* @author Vova Feldman (@svovaf)
return ( 'free' === $this->name );
* Checks if this plan supports "Technical Support".
* @author Leo Fajardo (leorw)
function has_technical_support() {
return ( ! empty( $this->support_email ) ||
! empty( $this->support_skype ) ||
! empty( $this->support_phone ) ||
! empty( $this->is_success_manager )
* @author Vova Feldman (@svovaf)
return ! $this->is_free() &&
is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );