self::is_hivepress_active(), 'woocommerce' => self::is_woocommerce_active(), ); return self::$detected; } /** * Can WPDO register zone-specific interceptors (hot/warm/cold/archive)? * * Zone interceptors are always safe to register — they operate on * WPDO's own tables. */ public static function can_register_zone_hooks(): bool { return true; } /** * Is HivePress core active? */ public static function is_hivepress_active(): bool { return class_exists( 'HivePress\Core' ); } /** * Is WooCommerce active? */ public static function is_woocommerce_active(): bool { return class_exists( 'WooCommerce' ); } /** * Integrations that are active while their AddOn is not. * * Core does not know these plugins; their fields are only optimised by the * matching AddOn. The AddOn is detected by its bootstrap class, which its * main file declares as soon as the plugin loads. * * @return array Plugin name → AddOn plugin slug. */ public static function missing_integration_addons(): array { $missing = array(); if ( self::is_hivepress_active() && ! class_exists( 'TMDO_HP_Bootstrap' ) ) { $missing['HivePress'] = '2meet-data-optimizer-hivepress-addon'; } if ( self::is_woocommerce_active() && ! class_exists( 'TMDO_Woocommerce_Bootstrap' ) ) { $missing['WooCommerce'] = '2meet-data-optimizer-woocommerce-addon'; } return $missing; } /** * Is LatePoint plugin active? (v2.5.0 M16 polish — for module detector.) * * LatePoint exposes the OsBookingHelper class and `latepoint_*` action * hooks. Detect via either the helper class or the version constant. */ public static function is_latepoint_active(): bool { return class_exists( 'OsBookingHelper' ) || defined( 'LATEPOINT_VERSION' ) || function_exists( 'latepoint_get_settings' ); } }