Created
December 4, 2025 10:50
-
-
Save propertyhive/fb102dc018f2e65cf8322f3af6d2e233 to your computer and use it in GitHub Desktop.
Use full address in enquiry subject
This file contains hidden or 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_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