← All changes
|
core/common/modules/events-manager/module.php
+0
-23
4.0.8
→
3.32.0-dev3
View file →
| @@ -4,9 +4,8 @@ | ||
| 4 | 4 | |
| 5 | 5 | use Elementor\Core\Base\Module as BaseModule; |
| 6 | 6 | use Elementor\Core\Common\Modules\Connect\Apps\Base_App; |
| 7 | 7 | use Elementor\Core\Experiments\Manager as Experiments_Manager; |
| 8 | -use Elementor\Includes\EditorAssetsAPI; | |
| 9 | 8 | use Elementor\Utils; |
| 10 | 9 | use Elementor\Plugin; |
| 11 | 10 | use Elementor\Tracker; |
| 12 | 11 | |
| @@ -17,10 +16,8 @@ | ||
| 17 | 16 | class Module extends BaseModule { |
| 18 | 17 | |
| 19 | 18 | const EXPERIMENT_NAME = 'editor_events'; |
| 20 | 19 | |
| 21 | - const REMOTE_MIXPANEL_CONFIG_URL = 'https://assets.elementor.com/mixpanel/v1/mixpanel.json'; | |
| 22 | - | |
| 23 | 20 | public function get_name() { |
| 24 | 21 | return 'events-manager'; |
| 25 | 22 | } |
| 26 | 23 | |
| @@ -29,17 +26,8 @@ | ||
| 29 | 26 | Tracker::is_allow_track() && |
| 30 | 27 | ! Tracker::has_terms_changed( '2025-07-07' ) && |
| 31 | 28 | Plugin::$instance->experiments->is_feature_active( self::EXPERIMENT_NAME ); |
| 32 | 29 | |
| 33 | - $is_flags_enabled = false; | |
| 34 | - | |
| 35 | - if ( $can_send_events ) { | |
| 36 | - $mixpanel_config = self::get_remote_mixpanel_config(); | |
| 37 | - $is_flags_enabled = EditorAssetsAPI::has_valid_nested_array( $mixpanel_config, [ 0 ] ) | |
| 38 | - ? (bool) ( $mixpanel_config[0]['flags'] ?? false ) | |
| 39 | - : false; | |
| 40 | - } | |
| 41 | - | |
| 42 | 30 | $settings = [ |
| 43 | 31 | 'can_send_events' => $can_send_events, |
| 44 | 32 | 'elementor_version' => ELEMENTOR_VERSION, |
| 45 | 33 | 'site_url' => hash( 'sha256', get_site_url() ), |
| @@ -49,9 +37,8 @@ | ||
| 49 | 37 | 'site_key' => get_option( Base_App::OPTION_CONNECT_SITE_KEY ), |
| 50 | 38 | 'subscription_id' => self::get_subscription_id(), |
| 51 | 39 | 'subscription' => self::get_subscription(), |
| 52 | 40 | 'token' => ELEMENTOR_EDITOR_EVENTS_MIXPANEL_TOKEN, |
| 53 | - 'flags_enabled' => $is_flags_enabled, | |
| 54 | 41 | ]; |
| 55 | 42 | |
| 56 | 43 | return $settings; |
| 57 | 44 | } |
| @@ -87,16 +74,6 @@ | ||
| 87 | 74 | return null; |
| 88 | 75 | } |
| 89 | 76 | |
| 90 | 77 | return json_decode( $license_data['value'], true ); |
| 91 | - } | |
| 92 | - | |
| 93 | - private static function get_remote_mixpanel_config() { | |
| 94 | - $editor_assets_api = new EditorAssetsAPI( [ | |
| 95 | - EditorAssetsAPI::ASSETS_DATA_URL => static::REMOTE_MIXPANEL_CONFIG_URL, | |
| 96 | - EditorAssetsAPI::ASSETS_DATA_TRANSIENT_KEY => '_elementor_mixpanel_config', | |
| 97 | - EditorAssetsAPI::ASSETS_DATA_KEY => 'mixpanel', | |
| 98 | - ] ); | |
| 99 | - | |
| 100 | - return $editor_assets_api->get_assets_data(); | |
| 101 | 78 | } |
| 102 | 79 | } |