PluginProbe
Tiered Pricing Table for WooCommerce / 8.1.0
Tiered Pricing Table for WooCommerce v8.1.0
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-site.php +80 -16 2.3.0 → 8.1.0 View file →
@@ -15,8 +15,12 @@
15 15 * @var number
16 16 */
17 17 public $site_id;
18 18 /**
19 + * @var int
20 + */
21 + public $blog_id;
22 + /**
19 23 * @var number
20 24 */
21 25 public $plugin_id;
22 26 /**
@@ -39,12 +43,8 @@
39 43 * @var string E.g. en-GB
40 44 */
41 45 public $language;
42 46 /**
43 - * @var string E.g. UTF-8
44 - */
45 - public $charset;
46 - /**
47 47 * @var string Platform version (e.g WordPress version).
48 48 */
49 49 public $platform_version;
50 50 /**
@@ -85,8 +85,10 @@
85 85 /**
86 86 * @author Leo Fajardo (@leorw)
87 87 *
88 88 * @since 1.2.1.5
89 + * @deprecated Since 2.5.1
90 + * @todo Remove after a few releases.
89 91 *
90 92 * @var bool
91 93 */
92 94 public $is_disconnected = false;
@@ -101,8 +103,16 @@
101 103 *
102 104 * @var bool
103 105 */
104 106 public $is_uninstalled = false;
107 + /**
108 + * @author Edgar Melkonyan
109 + *
110 + * @since 2.4.2
111 + *
112 + * @var bool
113 + */
114 + public $is_beta;
105 115
106 116 /**
107 117 * @param stdClass|bool $site
108 118 */
@@ -170,20 +180,71 @@
170 180 fs_starts_with( $subdomain, 'staging' ) ||
171 181 // WPEngine staging.
172 182 fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
173 183 fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
184 + fs_ends_with( $subdomain, '.wpengine.com' ) ||
185 + fs_ends_with( $subdomain, '.wpenginepowered.com' ) ||
174 186 // Pantheon
175 - ( fs_ends_with($subdomain, 'pantheonsite.io') &&
176 - (fs_starts_with($subdomain, 'test-') || fs_starts_with($subdomain, 'dev-'))) ||
187 + ( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
188 + ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
177 189 // Cloudways
178 190 fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
179 191 // Kinsta
180 - (fs_ends_with($subdomain, '.kinsta.com') && fs_starts_with($subdomain, 'staging-')) ||
192 + (
193 + ( fs_starts_with( $subdomain, 'stg-' ) || fs_starts_with( $subdomain, 'staging-' ) || fs_starts_with( $subdomain, 'env-' ) ) &&
194 + ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) )
195 + ) ||
181 196 // DesktopServer
182 - fs_ends_with( $subdomain, '.dev.cc' )
197 + fs_ends_with( $subdomain, '.dev.cc' ) ||
198 + // Pressable
199 + fs_ends_with( $subdomain, '.mystagingwebsite.com' ) ||
200 + // WPMU DEV
201 + ( fs_ends_with( $subdomain, '.tempurl.host' ) || fs_ends_with( $subdomain, '.wpmudev.host' ) ) ||
202 + // Vendasta
203 + ( fs_ends_with( $subdomain, '.websitepro-staging.com' ) || fs_ends_with( $subdomain, '.websitepro.hosting' ) ) ||
204 + // InstaWP
205 + ( fs_ends_with( $subdomain, '.instawp.co' ) || fs_ends_with( $subdomain, '.instawp.link' ) || fs_ends_with( $subdomain, '.instawp.xyz' ) ) ||
206 + // 10Web Hosting
207 + ( fs_ends_with( $subdomain, '-dev.10web.site' ) || fs_ends_with( $subdomain, '-dev.10web.cloud' ) )
183 208 );
184 209 }
185 210
211 + /**
212 + * @author Leo Fajardo (@leorw)
213 + * @since 2.9.1
214 + *
215 + * @param string $host
216 + *
217 + * @return bool
218 + */
219 + static function is_playground_wp_environment_by_host( $host ) {
220 + // Services aimed at providing a WordPress sandbox environment.
221 + $sandbox_wp_environment_domains = array(
222 + // InstaWP
223 + 'instawp.co',
224 + 'instawp.link',
225 + 'instawp.xyz',
226 +
227 + // TasteWP
228 + 'tastewp.com',
229 +
230 + // WordPress Playground
231 + 'playground.wordpress.net',
232 + );
233 +
234 + foreach ( $sandbox_wp_environment_domains as $domain) {
235 + if (
236 + ( $host === $domain ) ||
237 + fs_ends_with( $host, '.' . $domain ) ||
238 + fs_ends_with( $host, '-' . $domain )
239 + ) {
240 + return true;
241 + }
242 + }
243 +
244 + return false;
245 + }
246 +
186 247 function is_localhost() {
187 248 return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
188 249 }
189 250
@@ -211,23 +272,26 @@
211 272 return is_numeric( $this->trial_plan_id );
212 273 }
213 274
214 275 /**
215 - * @author Vova Feldman (@svovaf)
216 - * @since 2.0.0
276 + * @author Edgar Melkonyan
217 277 *
218 278 * @return bool
219 279 */
220 - function is_tracking_allowed() {
221 - return ( true !== $this->is_disconnected );
280 + function is_beta() {
281 + return ( isset( $this->is_beta ) && true === $this->is_beta );
222 282 }
223 283
224 284 /**
225 - * @author Vova Feldman (@svovaf)
226 - * @since 2.0.0
285 + * @author Leo Fajardo (@leorw)
286 + * @since 2.5.1
227 287 *
288 + * @param string $site_url
289 + *
228 290 * @return bool
229 291 */
230 - function is_tracking_prohibited() {
231 - return ! $this->is_tracking_allowed();
292 + function is_clone( $site_url ) {
293 + $clone_install_url = trailingslashit( fs_strip_url_protocol( $this->url ) );
294 +
295 + return ( $clone_install_url !== $site_url );
232 296 }
233 297 }