Created
January 20, 2026 09:30
-
-
Save g-maclean/5a993e4c32de13c9812963775c676721 to your computer and use it in GitHub Desktop.
Property Hive - Street - Only import properties that are not low profile
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_filter( "propertyhive_street_json_properties_due_import", 'filter_street_low_profile_properties', 10, 2 ); | |
| function filter_street_low_profile_properties($properties, $import_id) | |
| { | |
| $filtered_properties = array(); | |
| foreach ($properties as $property) { | |
| $is_low_profile = false; | |
| if (isset($property['salesListing']['is_low_profile']) && $property['salesListing']['is_low_profile'] === true) { | |
| $is_low_profile = true; | |
| } | |
| if (isset($property['lettingsListing']['is_low_profile']) && $property['lettingsListing']['is_low_profile'] === true) { | |
| $is_low_profile = true; | |
| } | |
| if (!$is_low_profile) { | |
| $filtered_properties[] = $property; | |
| } | |
| } | |
| return $filtered_properties; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment