Created
March 24, 2023 11:55
-
-
Save divienginesupport/8357fa740e3061a6cc822c5b634eb3e0 to your computer and use it in GitHub Desktop.
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
function custom_contact_recipient( $mail_to, $form_id, $form_data ) { | |
// Enter your form ID here | |
if ( $form_id == 'add_post_form' ) { | |
// These are the field conditions. We enter the field ID here and the expected value | |
if ( $form_data['department'] == 'Sales' ) { | |
$mail_to = '[email protected]'; | |
} else if ( $form_data['department'] == 'Support' ) { | |
$mail_to = '[email protected]'; | |
} | |
} | |
return $mail_to; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment