I am looking for a solution to generate a PDF page automactically from submitted WP forms data and then send a confirmation email with the generated PDF to the customers email address.
Can someone please advise the best methods to generate this PDF from WPforms data and then automatically send that PDF to the customer?
Appreciate any help on this.
]]>add_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3);
function attach_terms_conditions_pdf_to_email ( $attachments, $status , $order ) {
$allowed_statuses = array( 'customer_completed_order' );
if( isset( $status ) && in_array ( $status, $allowed_statuses ) ) {
$pdf_name = get_post_meta( get_the_id(), 'email_fatura', true );
$pdf_path = get_home_path() . '/Faturas/GestaoDespesas/' . $pdf_name;
$attachments[] = $pdf_path;
}
return $attachments;
}
Thank you in advance for any kind of help!
]]>https://www.ads-software.com/plugins/gravity-forms-pdf-extended/
]]>Thanks in advance for any advice anyone might have.
]]>