How to avoid file deletion after sending with add_uploaded_file
-
Hi.
I use this function found somewhere on the web and it works fine.function send_pdf( $cf7 ) { $id = $cf7->id(); if ($id==742){ $submission = WPCF7_Submission::get_instance(); $submission->add_uploaded_file('pdf', '/path_to_my_file.pdf'); } } add_action('wpcf7_before_send_mail','send_pdf', 100);
The problem is that after form submition you call
$this->remove_uploaded_files();
in includes/submission.php that delete my file :(.Is there any other possiblity to send dynamically a file to a user without delete it after sending it?
TIA.
Amicably,
Pierre.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to avoid file deletion after sending with add_uploaded_file’ is closed to new replies.