Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save propertyhive/73c5e874edc3912af888343847ea9648 to your computer and use it in GitHub Desktop.
Save propertyhive/73c5e874edc3912af888343847ea9648 to your computer and use it in GitHub Desktop.
add_filter( 'propertyhive_rex_property_request_body', 'request_sold_and_let_only' );
function request_sold_and_let_only( $data )
{
$data['criteria'] = array(
array(
"name" => "listing.system_listing_state",
"type" => "in",
"value" => array("sold", "leased")
),
// uncomment the below if you only want to import properties with 'publish_to_external' ticked
/*array(
"name" => "listing.publish_to_external",
"type" => "=",
"value" => true
)*/
);
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment