Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'propertyhive_property_enquiry_to', 'customise_enquiry_to', 10, 2 );
- function customise_enquiry_to( $to, $property_id )
- {
- $user_id = get_post_meta( $property_id, '_frontend_submission_user_id', TRUE );
- $email_address = get_post_meta( $user_id, '_email_address', TRUE );
- if ( $email_address == '' )
- {
- // maybe provide fallback address here
- // return 'fallback@somewhere.com';
- }
- return $email_address;
- }
Add Comment
Please, Sign In to add comment