Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Last active January 20, 2026 11:59
Show Gist options
  • Select an option

  • Save propertyhive/4de7bf4e80aa9fc39cede3ecaa108f26 to your computer and use it in GitHub Desktop.

Select an option

Save propertyhive/4de7bf4e80aa9fc39cede3ecaa108f26 to your computer and use it in GitHub Desktop.
add_filter( 'propertyhive_property_enquiry_to', 'custom_enquiry_to_address', 10, 2 );
function custom_enquiry_to_address( $to, $property_ids )
{
$property_id = is_array($property_ids) ? (int)$property_ids[0] : (int)$property_ids;
if ( empty($property_id) ) { return $to; }
$property = new PH_Property($property_id);
if ( $property->imported_id == 'REAPIT-ID-HERE' )
{
return '[email protected]';
}
return $to;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment