Created
November 17, 2022 13:35
-
-
Save propertyhive/59f181fa138f85c0f1d7240e4aac2b40 to your computer and use it in GitHub Desktop.
Only include to let unavailable in Reapit / Jet feed
This file contains 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_jet_properties_due_import", 'sort_properties_to_import' ); | |
function sort_properties_to_import($properties) | |
{ | |
$new_properties = array(); | |
foreach ( $properties as $property ) | |
{ | |
if ( (string)$property->Available == '1' ) | |
{ | |
// available, do nothing as we want to skip these | |
continue; | |
} | |
$new_properties[] = $property; | |
} | |
return $new_properties; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment