We started to get fatal errors in the version 3.9.0
https://imgur.com/a/8hjm5xE
And the error log is also flooded with these warnings
https://imgur.com/a/saagCfP
We’re using LogicHop and geolocation on WPEngine. Recently we noticed that the geolocation functionality was broken. On investigating, we tracked the issue down to the get_client_ip() method in LogicHop’s core.php file.
Specifically, this block of code:
if (array_key_exists('HTTP_CF_CONNECTING_IP', $_SERVER) && !empty($_SERVER['HTTP_CF_CONNECTING_IP'])) {
$client_ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
In our WPEngine environment, HTTP_CF_CONNECTING_IP does not contain a single IP address, but sometimes two or three, separated by commas,. e.g.. (this is just an example):
$_SERVER['HTTP_CF_CONNECTING_IP'] => '10.199.1.1,10.199.1.2'
When this happens, geolocation functionality breaks completely. The only way we’ve been able to restore it is by editing core.php and removing the block of code above, allowing LogicHop to fall back to another server variable that has the correct (single) IP address.
This is probably more of a Cloudflare issue than a LogicHop issue, but wanted to make you aware that it might be possible for the server variable value to contain multiple IP addresses so you could check for and parse out the first address, if this is the case.
]]>Hello! So, when I try to install the base plugin, this plugin, I get an error and the plugin only half installs. It’s in the GUI in the admin, but it trying to click on anything related to it brings up an empty page that says “There are no posts.” The error it initially throws is:
Fatal error: Uncaught Error: Call to undefined function get_plugins() in /var/www/vhosts/resultspw.com/subdomains/dev-usc/wp-content/plugins/logic-hop/includes/Measurement.php:49
Any ideas? The installation step is fine, this triggers on activation.
]]>The plugin has a major issue where if the Logic Hop license server is not working and a user even opens the settings page it will cause it to be invalid and lead to the plugin to stop working. This is really unacceptable.
]]>Environment: PHP 7.4 (to be upgraded to PHP 8 once the below warnings are resolved)
WordPress: 6.1.1
Logic Hop: 3.8.4
I am seeing the following warnings in the admin (all pages) with Query Monitor:
A. Warning in AJAX call:
“Use of undefined constant LOGICHOP_INSTANCE – assumed ‘LOGICHOP_INSTANCE’ (this will throw an Error in a future version of PHP)”
File: “wp-content/plugins/logic-hop/includes/Measurement.php”
Call stack:
3 “LogicHop_Measurement->measure()”
2 “check_version()”
1 “do_action(‘plugins_loaded’)”
A. Warning in AJAX call:
"Use of undefined constant LOGICHOP_SETTINGS - assumed 'LOGICHOP_SETTINGS' (this will throw an Error in a future version of PHP)"
File: "wp-content/plugins/logic-hop/includes/Measurement.php"
Call stack:
3 "LogicHop_Measurement->measure()"
2 "check_version()"
1 "do_action('plugins_loaded')"
]]>
We’ve installed Logic Hop 3.5.1 (along with the licensing plugin, HubSpot plugin, and the Google Analytics plugin) and have successfully developed a really great site for a customer. I love how much control we’ve been able to give them with the Logic Hop plugin.
During testing, we fired up an IE 11 instance and we were met with a syntax error in wp-content/plugins/logic-hop/public/js/ajax-methods.min.js that completely disables Logic Hop on the site. The syntax error is due to Javascript arrow functions which IE 11 doesn’t support.
What is your official support policy for IE 11? Should we be able to expect IE 11 support? I took a stab at transpiling the code that you ship, but ran into snags.
]]>Would it be possible to have a new type of operator something like in_reverse
and in_i_reverse
that would just reverse the order of variables when applying the logic?
I was looking at how the logic is applied for the UserData and I am not able to match correctly the users with the in
and in_i
operators. I am not saying there is an error, this works perfectly for everything else. My use-case is a bit different, and I would need your help with this if it’s possible.
It goes like this:
– Let’s say I have UserData.custom_attribute
that contains something like this val1,val2,val3
.
– I would need then to configure the custom rule to be true for any user with custom_attribute containing val1
.
– So, in this case, I would need that the applied logic to use the parameters in the other order (I am referring to this part ( 'in_i' => function($a, $b){
which only looks for a
to be contained inside b
and not the other way around).
Basically, what I am asking is can we have a new operator type that is doing “variable contains the value” instead of “variable can be found in the value”?
{"in_i": [ {"var":"UserData.custom_attribute"}, "some_value" ] }
{"in_i_reverse": [ "some_value", {"var":"UserData.custom_attribute"} ] }
Thank you very much!
Iulia
Hi,
I am trying to display programmatically some custom UserData attributes in the “select user data” dropdown when I am creating a new conditional statement, but I cannot find the right hook for this.
I am using the logichop_session_create
action to add custom user attributes.
Is there a filter I could use to achieve this?
Please advise.
Thank you!
Iulia
Hello,
First of all, I would like to say that this plugin is amazing, I like a lot the Gutenberg blocks feature.
I was looking through the documentation and could not find any example or description about how to display the data logic tags of an array type.
In my case, I am trying to use a custom object data that stores an array let’s say like Custom.myvar.colors
that is actually something like `[colors] => Array
(
[color1] => red
[color2] => green
[color3] => blue
)`.
How do I iterate through these when trying to display the variable? I tried with {{ var: Custom.myvar.colors }} and it just displays Array.
Thank you!
Iulia
After the most recent update, I no longer see the Shortocde, Not Shortcode, Javascript HTML section of the logic builder, instead I see Logic Tags.
Is there a different way to get that information now?
]]>Really excited about personalization and I’ve installed Logic Hop on my site and set up a UTM-code based condition and a user activity based condition, but how do I go about testing conditions once I’ve added them to my pages?
]]>Does this plug-in require users to be known by/a logged in user of the wordpress instance, or does the plugin handle that with something like a cookie?
]]>