Last active
March 14, 2019 10:36
-
-
Save bryceadams/a8e01ad4e1901f849658 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
This is my functions.php file, can you tell me which line should I paste the code?
``<?php
/**
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Core Constants
define( 'OCEANWP_THEME_DIR', get_template_directory() );
define( 'OCEANWP_THEME_URI', get_template_directory_uri() );
final class OCEANWP_Theme_Class {
}
new OCEANWP_Theme_Class;