PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.19
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.19
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
← All changes | includes/Services/Analytics.php +17 -1 1.10.61.10.19 View file →
@@ -418,11 +418,27 @@
418 418 */
419 419 private function get_default_properties(): array {
420 420 return array(
421 421 'plugin_version' => PLUGIN_VERSION,
422 - 'pro_active' => class_exists( '\WCPOS\WooCommercePOSPro\WooCommercePOSPro' ),
422 + 'pro_active' => $this->is_pro_active(),
423 423 'locale' => get_locale(),
424 424 );
425 + }
426 +
427 + /**
428 + * Whether the Pro plugin is active, safe to call before Init has run.
429 + *
430 + * Same situation as get_site_id(): the deactivation hook can fire in a
431 + * request where the WooCommerce check failed, Init never ran, and
432 + * wcpos-functions.php is not loaded. Fall back to the constant the helper
433 + * itself reads rather than fataling on the way out.
434 + */
435 + private function is_pro_active(): bool {
436 + if ( ! \function_exists( 'wcpos_is_pro_active' ) ) {
437 + return \defined( 'WCPOS\WooCommercePOSPro\VERSION' );
438 + }
439 +
440 + return wcpos_is_pro_active();
425 441 }
426 442
427 443 /**
428 444 * Dispatch a non-blocking HTTPS POST to the PostHog ingestion host.