Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created September 26, 2025 13:09
Show Gist options
  • Save propertyhive/8a53ede00fb49cede6b990460fc25a69 to your computer and use it in GitHub Desktop.
Save propertyhive/8a53ede00fb49cede6b990460fc25a69 to your computer and use it in GitHub Desktop.
add_action( "houzez_property_feed_property_imported_property_finder", 'fix_duplicate_community', 10, 3 );
function fix_duplicate_community($post_id, $property, $import_id)
{
if (
isset($property->community) &&
isset($property->sub_community) &&
(string)$property->community == (string)$property->sub_community
)
{
$address_parts = array();
if ( isset($property->community) && (string)$property->community != '' )
{
$address_parts[] = (string)$property->community;
}
if ( isset($property->city) && (string)$property->city != '' )
{
$address_parts[] = (string)$property->city;
}
update_post_meta( $post_id, 'fave_property_map_address', implode(", ", $address_parts) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment