PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
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 2.3.3 All 91 releases
← All changes | freemius/includes/entities/class-fs-site.php +82 -15 2.0 → 8.0.2 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 */
@@ -169,18 +179,72 @@
169 179 // SiteGround staging.
170 180 fs_starts_with( $subdomain, 'staging' ) ||
171 181 // WPEngine staging.
172 182 fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
183 + fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
184 + fs_ends_with( $subdomain, '.wpengine.com' ) ||
185 + fs_ends_with( $subdomain, '.wpenginepowered.com' ) ||
173 186 // Pantheon
174 - ( fs_ends_with($subdomain, 'pantheonsite.io') &&
175 - (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-' ) ) ) ||
176 189 // Cloudways
177 190 fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
178 191 // Kinsta
179 - (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 + ) ||
196 + // DesktopServer
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' ) )
180 208 );
181 209 }
182 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 +
183 247 function is_localhost() {
184 248 return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
185 249 }
186 250
@@ -208,23 +272,26 @@
208 272 return is_numeric( $this->trial_plan_id );
209 273 }
210 274
211 275 /**
212 - * @author Vova Feldman (@svovaf)
213 - * @since 2.0.0
276 + * @author Edgar Melkonyan
214 277 *
215 278 * @return bool
216 279 */
217 - function is_tracking_allowed() {
218 - return ( true !== $this->is_disconnected );
280 + function is_beta() {
281 + return ( isset( $this->is_beta ) && true === $this->is_beta );
219 282 }
220 283
221 284 /**
222 - * @author Vova Feldman (@svovaf)
223 - * @since 2.0.0
285 + * @author Leo Fajardo (@leorw)
286 + * @since 2.5.1
224 287 *
288 + * @param string $site_url
289 + *
225 290 * @return bool
226 291 */
227 - function is_tracking_prohibited() {
228 - 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 );
229 296 }
230 297 }