Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created December 4, 2025 10:50
Show Gist options
  • Select an option

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

Select an option

Save propertyhive/fb102dc018f2e65cf8322f3af6d2e233 to your computer and use it in GitHub Desktop.
Use full address in enquiry subject
add_filter( 'propertyhive_property_enquiry_subject', 'customise_enquiry_subject', 10, 2 );
function customise_enquiry_subject($subject, $property_ids)
{
if ( count($property_ids) == 1 )
{
$property = new PH_Property((int)$property_ids[0]);
$subject = __( 'New Property Enquiry', 'propertyhive' ) . ': ' . $property->get_formatted_full_address();
}
else
{
$subject = __( 'Multiple Property Enquiry', 'propertyhive' ) . ': ' . count($property_ids) . ' Properties';
}
return $subject;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment