PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 3.1.14
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v3.1.14
3.1.14 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 All 123 releases
← All changes | Inc/Core/FB/Actions/ActionsBase.php +15 -5 3.1.7 → 3.1.14 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 3.1.7 Free
4 + * @version 3.1.14 Free
5 5 *
6 6 * @author FirePlugins <[email protected]>
7 7 * @link https://www.fireplugins.com
8 8 * @copyright Copyright © 2026 FirePlugins All Rights Reserved
@@ -30,13 +30,21 @@
30 30 protected $actions;
31 31
32 32 /**
33 33 * Currently manipulating action item
34 - *
34 + *
35 35 * @var object
36 36 */
37 37 protected $item;
38 38
39 + /**
40 + * The campaign whose actions are currently being rendered. The "Run Javascript"
41 + * action needs it to check the author-based custom code gate.
42 + *
43 + * @var int
44 + */
45 + protected $box_id = 0;
46 +
39 47 public function __construct($classes = null)
40 48 {
41 49 $this->actions = $classes;
42 50
@@ -48,9 +56,9 @@
48 56 * The BeforeRender event fires before the box's layout is ready.
49 57 *
50 58 * @param object $box The box's settings object
51 59 *
52 - * @return void
60 + * @return object
53 61 */
54 62 public function onFireBoxBeforeRender($box)
55 63 {
56 64 if (!isset($box->ID))
@@ -56,9 +64,11 @@
56 64 if (!isset($box->ID))
57 65 {
58 66 return $box;
59 67 }
60 -
68 +
69 + $this->box_id = (int) $box->ID;
70 +
61 71 $js = '';
62 72
63 73 // get actions
64 74 $this->getActions($js);
@@ -241,7 +251,7 @@
241 251 }
242 252
243 253 private function addScript($js)
244 254 {
245 - wp_add_inline_script('firebox-main', $js);
255 + \FireBox\Core\Helpers\BoxHelper::addInlineScript($js);
246 256 }
247 257 }