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 +15 -17 1.0.62.1.39 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.6 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 /**
@@ -111,21 +110,22 @@
111 110 $this->clean();
112 111 return $log_id;
113 112 }
114 113 catch (Exception $e)
115 - {
116 - }
114 + {}
117 115 }
118 116
119 117 /**
120 118 * Handle the logging of other events
121 119 *
122 - * @param int $box_log_id
123 - * @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
124 124 *
125 125 * @return mixed
126 126 */
127 - private function handleOtherEvents($box_log_id, $event_id)
127 + private function handleOtherEvents($box_log_id, $event_id, $event_source = '', $event_label = '')
128 128 {
129 129 if (!$box_log_id)
130 130 {
131 131 return;
@@ -136,9 +136,10 @@
136 136 {
137 137 $data = [
138 138 'log_id' => $box_log_id,
139 139 'event' => $this->parseEvent($event_id),
140 - 'params' => '',
140 + 'event_source' => $event_source,
141 + 'event_label' => $event_label,
141 142 'date' => $this->factory->getDate()->format('Y-m-d H:i:s')
142 143 ];
143 144
144 145 firebox()->tables->boxlogdetails->insert($data);
@@ -170,8 +171,11 @@
170 171 break;
171 172 case 2:
172 173 $name = 'close';
173 174 break;
175 + case 3:
176 + $name = 'conversion';
177 + break;
174 178 }
175 179
176 180 return $name;
177 181 }
@@ -196,16 +200,10 @@
196 200 // Removes rows older than x days
197 201 $stats = \FireBox\Core\Helpers\BoxHelper::getParams();
198 202 $stats = new Registry($stats);
199 203
200 - $days = $stats->get('statsdays', 180);
204 + $days = $stats->get('statsdays', 730);
201 205
202 - if ($days == 'custom')
203 - {
204 - $days = $stats->get('statsdays_custom', 1);
205 - $days = $days < 0 ? 1 : $days;
206 - }
207 -
208 206 global $wpdb;
209 207
210 208 $sql = 'DELETE bl, bld
211 209 FROM `' . firebox()->tables->boxlog->getFullTableName() . '` as bl
@@ -216,9 +214,9 @@
216 214
217 215 firebox()->tables->boxlog->executeRaw($sql);
218 216
219 217 // set cache
220 - wp_cache_set($hash, $params, $hash, 720);
218 + wp_cache_set($hash, $stats, $hash, 720);
221 219
222 220 return true;
223 221 }
224 222 }