Created
March 12, 2015 17:30
-
-
Save kjohnson/67656f101406fa5b8327 to your computer and use it in GitHub Desktop.
Attach Email to Ninja Forms Notifications
This file contains 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
public function my_custom_add_attachment( $attachments, $id ) { | |
global $ninja_forms_processing; | |
// Get our submission ID | |
$sub_id = $ninja_forms_processing->get_form_setting( 'sub_id' ); | |
// convert submission id to array | |
$sub_ids = array( $sub_id ); | |
// File to Attach | |
$new_file = [CUSTOM CODE] | |
// add new file to attachment array | |
$attachments[] = $new_file; | |
return $attachments; | |
} | |
add_action( 'nf_email_notification_attachment_types', my_custom_add_attachment, 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment