Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'wpcf7_before_send_mail', 'save_application_form');
- function save_application_form($cf7) {
- /* GET EXTERNAL CLASSES */
- require(get_stylesheet_directory() . '/fpdf/fpdf.php');
- $pdf = new FPDF();
- $pdf->AddPage();
- $pdf->SetFont('Arial','B',16);
- $pdf->Write("Hello, World! Is there anything below this?");
- $pdf->Output(get_stylesheet_directory() . '/pdfgen/pdf.pdf', 'F');
- $cf7->uploaded_files = array ( 'attachedfile' => get_stylesheet_directory() . '/pdfgen/pdf.pdf' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement