Last active
March 23, 2021 13:57
-
-
Save alex-authlab/c64aff525c2c6f9733a9a17f6b47a0e5 to your computer and use it in GitHub Desktop.
WP Fluent Forms Email Attachment Filter
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('fluentform_filter_email_attachments', function($emailAttachments, $notification,$form, $entry){ | |
$target_form_id = 29; | |
if($form->id != $target_form_id){ | |
return; | |
} | |
$media_id = 144; | |
$emailAttachments[] = get_attached_file($media_id); | |
//or pass the exact file location like this | |
//$emailAttachments[] = '/doc/wp/wp-content/uploads/FLUENT_PDF_TEMPLATES/pdfCache/%c3%a4-%c3%bc%c3%9f-etc_531_171.pdf'; | |
return $emailAttachments; | |
}, 10, 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment