Skip to content

Instantly share code, notes, and snippets.

@dancameron
Last active August 29, 2015 14:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dancameron/1a0202e3bc784f567440 to your computer and use it in GitHub Desktop.
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