To start, what version of the plugin are you using? There is not an add_condition
method of any kind at line 866 in the current version, at least. I think the first thing I’d try is make sure you’re running the up to date version of the plugin.
Regardless of the version, I’ve never seen this error but the plugin does use add_condition
a couple of times on the SOQL object, which is the query that the plugin sends to Salesforce. If that method is undefined, it seems to me like the plugin has lost the query object entirely. I’m not sure how this would happen and I’ve never seen it happen, but you could try to do some error logging.
There are two places where we use this add_condition
method, at least in the current version of the plugin. What I would try is right before the add_condition
line that is causing the error, add this: error_log( print_r( $soql, true ) );
and see what it logs for you. Take note of which way the $soql
variable is being created, because it is done in two ways: 1) from the plugin cache, and 2) from the fieldmap settings if the cache has expired or does not exist.
If the cached version is the one causing errors, you should be able to clear the plugin cache and it should start working again. But if not, I really have no idea what’s causing it and you’d have to log what is happening much more carefully.