I have successfully set up a PDF attachment to a form user notification in the past on another server, but using the same code (and changing only the form ID and PDF file name), I cannot get the PDF to be attached. I am using this function added to my theme:
// Allows Gravity Forms to send a PDF attachment in email
add_filter("gform_user_notification_attachments_2", "add_attachment", 10, 3);
function add_attachment($attachments, $lead, $form){
//getting wordpress upload folder
$upload = wp_upload_dir();
$upload_path = $upload["basedir"];
$attachments = array();
//add a file from the uploads folder
$attachments[] = $upload_path . "/choosing-a-motorcycle-tour.pdf";
return $attachments;
}
Am I doing something wrong, or have things change in 1.7?
-- Lee