Skip to content

Instantly share code, notes, and snippets.

@zarankumar
Forked from bryceadams/gist:a8e01ad4e1901f849658
Last active September 4, 2015 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zarankumar/5317944fcc81bcd107a0 to your computer and use it in GitHub Desktop.
Save zarankumar/5317944fcc81bcd107a0 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3);
function attach_terms_conditions_pdf_to_email ( $attachments , $id, $object ) {
$your_pdf_path = get_template_directory() . '/terms.pdf';
$attachments[] = $your_pdf_path;
return $attachments;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment