PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 2.1.39
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v2.1.39
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/FB/Log.php +17 -17 1.0.42.1.39 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.4 Free
4 + * @version 2.1.39 Free
5 5 *
6 6 * @author FirePlugins <info@fireplugins.com>
7 7 * @link https://www.fireplugins.com
8 - * @copyright Copyright © 2021 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\FB;
@@ -17,9 +17,8 @@
17 17 }
18 18
19 19 use FPFramework\Libs\Registry;
20 20 use FireBox\Core\Helpers\BoxHelper;
21 -use FireBox\Core\Helpers\DBHelper;
22 21
23 22 class Log
24 23 {
25 24 /**
@@ -66,9 +65,11 @@
66 65 {
67 66 return;
68 67 }
69 68
69 +
70 70 $country_value = '';
71 +
71 72
72 73
73 74
74 75 // Everything seems OK. Let's save data to db.
@@ -109,21 +110,22 @@
109 110 $this->clean();
110 111 return $log_id;
111 112 }
112 113 catch (Exception $e)
113 - {
114 - }
114 + {}
115 115 }
116 116
117 117 /**
118 118 * Handle the logging of other events
119 119 *
120 - * @param int $box_log_id
121 - * @param int $event_id
120 + * @param int $box_log_id
121 + * @param int $event_id
122 + * @param string $event_source
123 + * @param string $event_label
122 124 *
123 125 * @return mixed
124 126 */
125 - private function handleOtherEvents($box_log_id, $event_id)
127 + private function handleOtherEvents($box_log_id, $event_id, $event_source = '', $event_label = '')
126 128 {
127 129 if (!$box_log_id)
128 130 {
129 131 return;
@@ -134,9 +136,10 @@
134 136 {
135 137 $data = [
136 138 'log_id' => $box_log_id,
137 139 'event' => $this->parseEvent($event_id),
138 - 'params' => '',
140 + 'event_source' => $event_source,
141 + 'event_label' => $event_label,
139 142 'date' => $this->factory->getDate()->format('Y-m-d H:i:s')
140 143 ];
141 144
142 145 firebox()->tables->boxlogdetails->insert($data);
@@ -168,8 +171,11 @@
168 171 break;
169 172 case 2:
170 173 $name = 'close';
171 174 break;
175 + case 3:
176 + $name = 'conversion';
177 + break;
172 178 }
173 179
174 180 return $name;
175 181 }
@@ -194,16 +200,10 @@
194 200 // Removes rows older than x days
195 201 $stats = \FireBox\Core\Helpers\BoxHelper::getParams();
196 202 $stats = new Registry($stats);
197 203
198 - $days = $stats->get('statsdays', 180);
204 + $days = $stats->get('statsdays', 730);
199 205
200 - if ($days == 'custom')
201 - {
202 - $days = $stats->get('statsdays_custom', 1);
203 - $days = $days < 0 ? 1 : $days;
204 - }
205 -
206 206 global $wpdb;
207 207
208 208 $sql = 'DELETE bl, bld
209 209 FROM `' . firebox()->tables->boxlog->getFullTableName() . '` as bl
@@ -214,9 +214,9 @@
214 214
215 215 firebox()->tables->boxlog->executeRaw($sql);
216 216
217 217 // set cache
218 - wp_cache_set($hash, $params, $hash, 720);
218 + wp_cache_set($hash, $stats, $hash, 720);
219 219
220 220 return true;
221 221 }
222 222 }