Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Created March 12, 2015 17:30
Show Gist options
  • Save kjohnson/67656f101406fa5b8327 to your computer and use it in GitHub Desktop.
Save kjohnson/67656f101406fa5b8327 to your computer and use it in GitHub Desktop.
Attach Email to Ninja Forms Notifications
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