Guest User

Untitled

a guest
Nov 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. add_filter( 'propertyhive_property_enquiry_to', 'customise_enquiry_to', 10, 2 );
  2. function customise_enquiry_to( $to, $property_id )
  3. {
  4. $user_id = get_post_meta( $property_id, '_frontend_submission_user_id', TRUE );
  5. $email_address = get_post_meta( $user_id, '_email_address', TRUE );
  6. if ( $email_address == '' )
  7. {
  8. // maybe provide fallback address here
  9. // return 'fallback@somewhere.com';
  10. }
  11. return $email_address;
  12. }
Add Comment
Please, Sign In to add comment