I am trying to send a PDF file to shop admin once the new order is placed. The issue with woocommerce_email_attachments
hook is that email is sent to both customer and admin.
add_filter( 'woocommerce_email_attachments', 'attach_order_notice', 10, 3 );
function attach_order_notice ( $attachments, $id, $object ) {
$pdf_path = get_template_directory() . '/notice.pdf';
$attachments[] = $pdf_path;
return $attachments;
}
At the moment both customer and admin receive new order emails (including attachments) and I expect both customer and admin receive new order emails but only send an attachment to admin.
Is this even possible?