Woocommerce Email attachments not working – file not being attached
Apparently Woocommerce need a local path and not a URL to the file. In order to fix I used this: function attach_order_notice ( $attachments, $email_id, $order ) { // Only for “New Order” email notification (for admin) //if( $email_id == ‘new_order’ ){ $file_path = wp_upload_dir()[‘path’]; $file_name = get_field( ’email_file_attachment’, ‘options’ )[‘filename’]; $attachments[] = $file_path . … Read more