PluginProbe
Tiered Pricing Table for WooCommerce / 2.1.2
Tiered Pricing Table for WooCommerce v2.1.2
8.1.0 8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 All 92 releases
← All changes | freemius/includes/entities/class-fs-plugin-license.php +1 -66 8.0.2 → 2.1.2 View file →
@@ -29,38 +29,10 @@
29 29 * @var number
30 30 */
31 31 public $plan_id;
32 32 /**
33 - * @author Leo Fajardo (@leorw)
34 - * @since 2.3.0
35 - *
36 - * @var string
37 - */
38 - public $parent_plan_name;
39 - /**
40 - * @author Leo Fajardo (@leorw)
41 - * @since 2.3.0
42 - *
43 - * @var string
44 - */
45 - public $parent_plan_title;
46 - /**
47 - * @author Leo Fajardo (@leorw)
48 - * @since 2.3.0
49 - *
50 33 * @var number
51 34 */
52 - public $parent_license_id;
53 - /**
54 - * @author Leo Fajardo (@leorw)
55 - * @since 2.4.0
56 - *
57 - * @var array
58 - */
59 - public $products;
60 - /**
61 - * @var number
62 - */
63 35 public $pricing_id;
64 36 /**
65 37 * @var int|null
66 38 */
@@ -81,12 +53,8 @@
81 53 * @var string
82 54 */
83 55 public $secret_key;
84 56 /**
85 - * @var bool
86 - */
87 - public $is_whitelabeled;
88 - /**
89 57 * @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
90 58 * license.
91 59 */
92 60 public $is_free_localhost;
@@ -126,9 +94,9 @@
126 94 *
127 95 * @return int
128 96 */
129 97 function left() {
130 - if ( ! $this->is_features_enabled() ) {
98 + if ( ! $this->is_active() || $this->is_expired() ) {
131 99 return 0;
132 100 }
133 101
134 102 if ( $this->is_unlimited() ) {
@@ -288,12 +256,8 @@
288 256 *
289 257 * @return bool
290 258 */
291 259 function is_first_payment_pending() {
292 - if ( $this->is_lifetime() ) {
293 - return false;
294 - }
295 -
296 260 return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
297 261 }
298 262
299 263 /**
@@ -300,35 +264,6 @@
300 264 * @return int
301 265 */
302 266 function total_activations() {
303 267 return ( $this->activated + $this->activated_local );
304 - }
305 -
306 - /**
307 - * @author Vova Feldman (@svovaf)
308 - * @since 2.3.1
309 - *
310 - * @return string
311 - */
312 - function get_html_escaped_masked_secret_key() {
313 - return self::mask_secret_key_for_html( $this->secret_key );
314 - }
315 -
316 - /**
317 - * @author Vova Feldman (@svovaf)
318 - * @since 2.3.1
319 - *
320 - * @param string $secret_key
321 - *
322 - * @return string
323 - */
324 - static function mask_secret_key_for_html( $secret_key ) {
325 - return (
326 - // Initial 6 chars - sk_ABC
327 - htmlspecialchars( substr( $secret_key, 0, 6 ) ) .
328 - // Masking
329 - str_pad( '', ( strlen( $secret_key ) - 9 ) * 6, '•' ) .
330 - // Last 3 chars.
331 - htmlspecialchars( substr( $secret_key, - 3 ) )
332 - );
333 268 }
334 269 }