Jeg skal have sat en php ind i min funktioner.php så jeg kan sende mine handelsbetingelser med ordrebekræftelse.
men hvordan får jeg min pdf.file ind "$ your_pdf_path"
er det med en html kode ??? eller hvad ???
Kode: Vælg alt
<?php
add_filter( 'woocommerce_email_attachments', 'attach_trade_conditions_pdf_to_email', 10, 3);
function attach_trade_conditions_pdf_to_email ( $attachments , $id, $object ) {
$your_pdf_path = get_template_directory() . '/trade-conditions.pdf';
$attachments[] = $your_pdf_path;
return $attachments;
}