Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Adding String Attachments (AddStringAttachment) with wp_mail (part 1)
<?php
// add some info about your attachment so that
// your string attachment can be created later
$attachments = array();
$pdf_attachment = array(
'pdf_doc_attachment_id' => $doc_id,
);
$attachments[] = wp_json_encode( $pdf_attachment );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment