Created
September 26, 2025 13:09
-
-
Save propertyhive/8a53ede00fb49cede6b990460fc25a69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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