Skip to content

Instantly share code, notes, and snippets.

@benoitmercusot
Created February 7, 2017 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save benoitmercusot/db3ae8c8b5df66276a447ad2138820ce to your computer and use it in GitHub Desktop.
Save benoitmercusot/db3ae8c8b5df66276a447ad2138820ce to your computer and use it in GitHub Desktop.
add_filter( 'woocommerce_email_attachments', 'mbcreation_woocommerce_attachments', 10, 3 );
function mbcreation_woocommerce_attachments($attachments, $email_id, $email_object){
if( $email_id === 'customer_on_hold_order'){
$attachments[] = get_attached_file( 612 );
}
return $attachments;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment