Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created November 17, 2022 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save propertyhive/59f181fa138f85c0f1d7240e4aac2b40 to your computer and use it in GitHub Desktop.
Save propertyhive/59f181fa138f85c0f1d7240e4aac2b40 to your computer and use it in GitHub Desktop.
Only include to let unavailable in Reapit / Jet feed
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