PluginProbe ʕ •ᴥ•ʔ
Auto Post Cleaner / 3.10.2
Auto Post Cleaner v3.10.2
3.12.0 3.13.1 3.2.4 3.2.5 3.3.0 3.3.10 3.3.11 3.3.8 3.4.2 3.5.3 3.6.0 3.7.0 3.7.1 3.7.2 3.7.3 3.7.5 3.7.6 3.8.0 3.9.0 3.9.4 3.9.6 3.9.7 trunk 3.0.0 3.1.0 3.10.1 3.10.2 3.11.4
delete-old-posts-programmatically / freemius / includes / entities / class-fs-plugin-plan.php
delete-old-posts-programmatically / freemius / includes / entities Last commit date
class-fs-affiliate-terms.php 3 years ago class-fs-affiliate.php 5 years ago class-fs-billing.php 5 years ago class-fs-entity.php 5 years ago class-fs-payment.php 5 years ago class-fs-plugin-info.php 5 years ago class-fs-plugin-license.php 2 years ago class-fs-plugin-plan.php 11 months ago class-fs-plugin-tag.php 11 months ago class-fs-plugin.php 3 years ago class-fs-pricing.php 5 years ago class-fs-scope-entity.php 5 years ago class-fs-site.php 1 year ago class-fs-subscription.php 5 years ago class-fs-user.php 1 year ago index.php 5 years ago
class-fs-plugin-plan.php
151 lines
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.0.5
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 /**
14 * Class FS_Plugin_Plan
15 *
16 */
17 class FS_Plugin_Plan extends FS_Entity {
18
19 #region Properties
20
21 /**
22 * @var number
23 */
24 public $plugin_id;
25 /**
26 * @var string
27 */
28 public $name;
29 /**
30 * @var string
31 */
32 public $title;
33 /**
34 * @var string
35 */
36 public $description;
37 /**
38 * @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
39 */
40 public $is_free_localhost;
41 /**
42 * @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
43 * support.
44 */
45 public $is_block_features;
46 /**
47 * @var int
48 */
49 public $license_type;
50 /**
51 * @var bool
52 */
53 public $is_https_support;
54 /**
55 * @var int Trial days.
56 */
57 public $trial_period;
58 /**
59 * @var string If true, require payment for trial.
60 */
61 public $is_require_subscription;
62 /**
63 * @var string Knowledge Base URL.
64 */
65 public $support_kb;
66 /**
67 * @var string Support Forum URL.
68 */
69 public $support_forum;
70 /**
71 * @var string Support email address.
72 */
73 public $support_email;
74 /**
75 * @var string Support phone.
76 */
77 public $support_phone;
78 /**
79 * @var bool Is personal success manager supported with the plan.
80 */
81 public $is_success_manager;
82 /**
83 * @var bool Is featured plan.
84 */
85 public $is_featured;
86 /**
87 * @var bool Is hidden plan.
88 */
89 public $is_hidden;
90 /**
91 * @var FS_Pricing[]
92 */
93 public $pricing;
94 /**
95 * @var object[]
96 */
97 public $features;
98
99 #endregion Properties
100
101 /**
102 * @param object|bool $plan
103 */
104 function __construct( $plan = false ) {
105 parent::__construct( $plan );
106
107 if ( is_object( $plan ) ) {
108 $this->name = strtolower( $plan->name );
109 }
110 }
111
112 static function get_type() {
113 return 'plan';
114 }
115
116 /**
117 * @author Vova Feldman (@svovaf)
118 * @since 1.0.9
119 *
120 * @return bool
121 */
122 function is_free() {
123 return ( 'free' === $this->name );
124 }
125
126 /**
127 * Checks if this plan supports "Technical Support".
128 *
129 * @author Leo Fajardo (leorw)
130 * @since 1.2.0
131 *
132 * @return bool
133 */
134 function has_technical_support() {
135 return ( ! empty( $this->support_email ) ||
136 ! empty( $this->support_phone ) ||
137 ! empty( $this->is_success_manager )
138 );
139 }
140
141 /**
142 * @author Vova Feldman (@svovaf)
143 * @since 1.0.9
144 *
145 * @return bool
146 */
147 function has_trial() {
148 return ! $this->is_free() &&
149 is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
150 }
151 }