Skip to content

Instantly share code, notes, and snippets.

@Tomasz-Silpion
Created April 14, 2017 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tomasz-Silpion/d8cfeffaf56b60b22b019bddce13830e to your computer and use it in GitHub Desktop.
Save Tomasz-Silpion/d8cfeffaf56b60b22b019bddce13830e to your computer and use it in GitHub Desktop.
Load WooCommerce PDF Invoices & Packing Slips document anywhere
<?php
require('./wp-load.php');
$wpo_wcpdf = WPO_WCPDF();
$pdf = $wpo_wcpdf->export->get_pdf('invoice', array($order_id));
header("Content-type:application/pdf");
echo $pdf;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment