PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 3.0.1
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v3.0.1
3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 All 122 releases
← All changes | Inc/Core/UsageTracking/UsageTracking.php +42 -115 trunk3.0.1 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 3.1.13 Free
4 + * @version 3.0.1 Free
5 5 *
6 6 * @author FirePlugins <info@fireplugins.com>
7 7 * @link https://www.fireplugins.com
8 - * @copyright Copyright © 2026 FirePlugins All Rights Reserved
8 + * @copyright Copyright © 2025 FirePlugins All Rights Reserved
9 9 * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
10 10 */
11 11
12 12 namespace FireBox\Core\UsageTracking;
@@ -32,9 +32,8 @@
32 32 {
33 33 global $wpdb;
34 34
35 35 $theme_data = wp_get_theme();
36 - $database_version = $wpdb->db_version();
37 36
38 37 $payload = [
39 38 // Generic Data
40 39 'url' => home_url(),
@@ -40,11 +39,10 @@
40 39 'url' => home_url(),
41 40 'email' => get_option('admin_email'),
42 41 'php_version' => PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION,
43 42 'wp_version' => get_bloginfo('version'),
44 - 'database_type' => $this->getDatabaseType($database_version),
45 - 'database_driver' => $this->getDatabaseDriver(),
46 - 'database_version' => $database_version,
43 + 'database_type' => $this->getDatabaseType(),
44 + 'database_version' => $wpdb->db_version(),
47 45 'server_version' => isset($_SERVER['SERVER_SOFTWARE']) ? sanitize_text_field(wp_unslash($_SERVER['SERVER_SOFTWARE'])) : '',
48 46 'is_debug' => defined('WP_DEBUG') && WP_DEBUG,
49 47 'is_ssl' => is_ssl(),
50 48 'is_multisite' => is_multisite(),
@@ -56,34 +54,23 @@
56 54 'active_plugins' => $this->get_active_plugins(),
57 55 'theme_name' => $theme_data->get('Name'),
58 56 'theme_version' => $theme_data->get('Version'),
59 57 'locale' => get_locale(),
60 - 'timezone_offset' => wp_timezone_string(),
58 + 'timezone_offset' => wp_timezone_string(),
61 59 // FireBox Specific Data
62 60 'firebox_version' => FBOX_VERSION,
63 - 'firebox_license_key' => \FireBox\Core\Helpers\License::getKey(),
61 + 'firebox_license_key' => get_option('firebox_license_key', ''),
64 62 'firebox_license_type' => FBOX_LICENSE_TYPE,
65 - 'firebox_license_plan' => FBOX_LICENSE_PLAN,
66 - 'firebox_license_status' => \FireBox\Core\Helpers\License::getStatus(),
63 + 'firebox_license_status' => get_option('firebox_license_status', ''),
67 64 'firebox_is_pro' => FBOX_LICENSE_TYPE === 'pro',
68 - 'firebox_connected_integrations' => $this->getConnectedIntegrations(),
69 65 'firebox_views' => $this->pluginData->getViews(),
70 66 'firebox_dimensions' => $this->pluginData->getDimensionsData(),
71 67 'firebox_campaigns_published' => $this->pluginData->getCampaigns('publish'),
72 68 'firebox_campaigns_draft' => $this->pluginData->getCampaigns('draft'),
73 69 'firebox_campaigns_trash' => $this->pluginData->getCampaigns('trash'),
74 - 'firebox_ttf_draft_sec' => $this->pluginData->getTimeToFirstCampaignDraft(),
75 - 'firebox_ttf_publish_sec' => $this->pluginData->getTimeToFirstCampaignPublish(),
76 70 'firebox_submissions' => $this->pluginData->getSubmissions(),
77 - 'firebox_view_through_revenue' => $this->pluginData->getViewThroughRevenue(),
78 - 'firebox_click_through_revenue' => $this->pluginData->getClickThroughRevenue(),
79 71 'firebox_classic_campaigns' => $this->pluginData->getTotalsBySetting('mode', 'popup'),
80 - 'firebox_mode_slide_in' => $this->pluginData->getTotalsBySetting('mode', 'slide-in'),
81 - 'firebox_mode_fullscreen' => $this->pluginData->getTotalsBySetting('mode', 'fullscreen'),
82 - 'firebox_mode_stickybar' => $this->pluginData->getTotalsBySetting('mode', 'stickybar'),
83 72 'firebox_pageslide_campaigns' => $this->pluginData->getTotalsBySetting('mode', 'pageslide'),
84 - 'firebox_mode_floating' => $this->pluginData->getTotalsBySetting('mode', 'floating'),
85 - 'firebox_mode_sidebar' => $this->pluginData->getTotalsBySetting('mode', 'sidebar'),
86 73 'firebox_embed_campaigns' => $this->pluginData->getTotalsBySetting('mode', 'embed'),
87 74 'firebox_campaigns_pageload' => $this->pluginData->getTotalsBySetting('triggermethod', 'pageload'),
88 75 'firebox_campaigns_scroll_depth' => $this->pluginData->getTotalsBySetting('triggermethod', 'pageheight'),
89 76 'firebox_campaigns_element_visibility' => $this->pluginData->getTotalsBySetting('triggermethod', 'element'),
@@ -103,11 +90,11 @@
103 90 'firebox_cookie_never' => $this->pluginData->getTotalsBySetting('assign_cookietype', 'never'),
104 91 'firebox_cookie_ever' => $this->pluginData->getTotalsBySetting('assign_cookietype', 'ever'),
105 92 'firebox_cookie_session' => $this->pluginData->getTotalsBySetting('assign_cookietype', 'session'),
106 93 'firebox_cookie_custom' => $this->pluginData->getTotalsBySetting('assign_cookietype', 'custom'),
107 - 'firebox_auto_close' => $this->pluginData->getTotalsBySetting('box_auto_close', 'boolean'),
108 - 'firebox_auto_focus' => $this->pluginData->getTotalsBySetting('autofocus', 'boolean'),
109 - 'firebox_close_with_esc' => $this->pluginData->getTotalsBySetting('close_on_esc', 'boolean'),
94 + 'firebox_auto_close' => $this->pluginData->getTotalsBySetting('box_auto_close', 'yes'),
95 + 'firebox_auto_focus' => $this->pluginData->getTotalsBySetting('autofocus', '1'),
96 + 'firebox_close_with_esc' => $this->pluginData->getTotalsBySetting('close_on_esc', '1'),
110 97 'firebox_display_conditions_all' => $this->pluginData->getTotalsBySetting('display_conditions_type', 'all'),
111 98 'firebox_display_conditions_mirror' => $this->pluginData->getTotalsBySetting('display_conditions_type', 'mirror'),
112 99 'firebox_display_conditions_custom' => $this->pluginData->getTotalsBySetting('display_conditions_type', 'custom'),
113 100 'firebox_campaigns_with_sound' => $this->pluginData->getTotalsBySetting('opening_sound.source', 'cond:not:none'),
@@ -169,10 +156,10 @@
169 156 'firebox_php_scripts_on_close' => $this->pluginData->getTotalsBySetting('phpscripts.close', 'cond:not:empty'),
170 157 'firebox_php_scripts_on_form_success' => $this->pluginData->getTotalsBySetting('phpscripts.formsuccess', 'cond:not:empty'),
171 158 'firebox_custom_css' => $this->pluginData->getTotalsBySetting('customcss', 'cond:not:empty'),
172 159 'firebox_custom_javascript' => $this->pluginData->getTotalsBySetting('customcode', 'cond:not:empty'),
173 - 'firebox_test_mode' => $this->pluginData->getTotalsBySetting('testmode', 'boolean'),
174 - 'firebox_prevent_page_scrollling' => $this->pluginData->getTotalsBySetting('preventpagescroll', 'boolean'),
160 + 'firebox_test_mode' => $this->pluginData->getTotalsBySetting('testmode', '1'),
161 + 'firebox_prevent_page_scrollling' => $this->pluginData->getTotalsBySetting('preventpagescroll', '1'),
175 162 'firebox_settings' => $this->getSettings()
176 163 ];
177 164
178 165 return $payload;
@@ -177,38 +164,10 @@
177 164
178 165 return $payload;
179 166 }
180 167
181 - private function getDatabaseType($database_version = '')
168 + private function getDatabaseType()
182 169 {
183 - $database_version = strtolower(trim((string) $database_version));
184 - $database_driver = strtolower((string) $this->getDatabaseDriver());
185 -
186 - if (strpos($database_version, 'mariadb') !== false || strpos($database_driver, 'mariadb') !== false)
187 - {
188 - return 'MariaDB';
189 - }
190 -
191 - if (
192 - strpos($database_driver, 'mysql') !== false ||
193 - strpos($database_driver, 'mysqli') !== false ||
194 - strpos($database_driver, 'pdo_mysql') !== false ||
195 - strpos($database_driver, 'pdo\\mysql') !== false
196 - )
197 - {
198 - return 'MySQL';
199 - }
200 -
201 - if ($database_version !== '')
202 - {
203 - return 'MySQL';
204 - }
205 -
206 - return 'Unknown';
207 - }
208 -
209 - private function getDatabaseDriver()
210 - {
211 170 global $wpdb;
212 171
213 172 if (is_object($wpdb->dbh))
214 173 {
@@ -223,74 +182,42 @@
223 182
224 183 return $extension;
225 184 }
226 185
227 - private function getSettings()
228 - {
229 - $excluded_keys = [
230 - 'api_key',
231 - 'geo_license_key',
232 - 'license_key',
233 - 'cloudflare_turnstile_site_key',
234 - 'cloudflare_turnstile_secret_key',
235 - 'recaptcha_v2_checkbox_site_key',
236 - 'recaptcha_v2_checkbox_secret_key',
237 - 'recaptcha_v2_invisible_site_key',
238 - 'recaptcha_v2_invisible_secret_key',
239 - 'recaptcha_v3_site_key',
240 - 'recaptcha_v3_secret_key',
241 - 'hcaptcha_site_key',
242 - 'hcaptcha_secret_key',
243 - 'openai_api_key',
244 - 'stripe_test_secret_key',
245 - 'stripe_test_publishable_key',
246 - 'stripe_live_secret_key',
247 - 'stripe_live_publishable_key',
248 - 'stripe_webhooks_secret_test',
249 - 'stripe_webhooks_secret_live',
250 - 'stripe_webhooks_id_test',
251 - 'stripe_webhooks_id_live',
252 - ];
253 -
254 - $excluded_keys = array_merge(
255 - $excluded_keys,
256 - \FireBox\Core\Helpers\Integrations::getSettingsKeys()
257 - );
258 -
186 + private function getSettings()
187 + {
259 188 return array_diff_key(
260 189 $this->settings,
261 - array_flip($excluded_keys)
190 + array_flip(
191 + [
192 + 'api_key',
193 + 'geo_license_key',
194 + 'license_key',
195 + 'cloudflare_turnstile_site_key',
196 + 'cloudflare_turnstile_secret_key',
197 + 'recaptcha_v2_checkbox_site_key',
198 + 'recaptcha_v2_checkbox_secret_key',
199 + 'recaptcha_v2_invisible_site_key',
200 + 'recaptcha_v2_invisible_secret_key',
201 + 'recaptcha_v3_site_key',
202 + 'recaptcha_v3_secret_key',
203 + 'hcaptcha_site_key',
204 + 'hcaptcha_secret_key',
205 + 'openai_api_key',
206 + 'stripe_test_secret_key',
207 + 'stripe_test_publishable_key',
208 + 'stripe_live_secret_key',
209 + 'stripe_live_publishable_key',
210 + 'stripe_webhooks_secret_test',
211 + 'stripe_webhooks_secret_live',
212 + 'stripe_webhooks_id_test',
213 + 'stripe_webhooks_id_live',
214 + ]
215 + )
262 216 );
263 217 }
264 218
265 219 /**
266 - * Returns currently connected integrations.
267 - *
268 - * @return array
269 - */
270 - private function getConnectedIntegrations()
271 - {
272 - $connected_integrations = [];
273 - $integrations = \FireBox\Core\Helpers\Integrations::getSettingsManagedIntegrations();
274 - if (!is_array($integrations))
275 - {
276 - return $connected_integrations;
277 - }
278 -
279 - foreach ($integrations as $integration)
280 - {
281 - if (!is_array($integration) || empty($integration['slug']) || empty($integration['connected']))
282 - {
283 - continue;
284 - }
285 -
286 - $connected_integrations[] = (string) $integration['slug'];
287 - }
288 -
289 - return $connected_integrations;
290 - }
291 -
292 - /**
293 220 * Determines whether the plugin is active for the entire network.
294 221 *
295 222 * @return bool
296 223 */
@@ -363,5 +290,5 @@
363 290 public function get_user_agent()
364 291 {
365 292 return 'FireBox/' . FBOX_VERSION . '; ' . get_bloginfo('url');
366 293 }
367 -}
294 +}