propertyhive / WP-Property-Hive

The complete estate agency software plugin for WordPress
Other
26 stars 26 forks source link

[Property Import] Bug: XML data not passed to AgentInsight action callback #174

Closed mattsims closed 2 years ago

mattsims commented 2 years ago

Hi,

Hope you're all doing well.

I found a bug today – line 1616 of class-ph-agentsinsight-xml-import.php passes an incorrectly-named null parameter $unit to the action callback (which means the callback doesn't get any of the XML data):

do_action( "propertyhive_property_unit_imported_agentsinsight_xml", $unit_post_id, $unit );

$unit doesn't exist – it should be $floor_unit.

Regards,

Matt.

propertyhive commented 2 years ago

Hi Matt,

Thanks for reporting this. For me it was line 1680 so suspect there is a version difference but the problem remained the same. I've updated this for future versions.

Thanks again, Steve

mattsims commented 2 years ago

Many thanks for the quick resolution Steve!

Do you know when an updated version might be released? As we're keen to deploy some changes to a client site that will rely on this hook 👍

propertyhive commented 2 years ago

I'm unsure at this time but here's a link to the latest version with the aforementioned change:

https://we.tl/t-aSWoRstXaN

Note: Pay attention to the change log item in version 1.2.55 which reads:

"Floors/units table appended to description imported from AgentsInsight"

... just in case it's this floors table you're looking to replicate and use the hook for in the first place.

Hope that helps, Steve