Download Invoice link with shortcode

WooCommerce PDF Invoices & Packing Slips comes with a useful shortcode to place a Download Invoice link in other pages, where you have access to the order ID. Alternatively you define the ID inside the order_id attribute.

  • link_text=”” accepts any text. Ex: Download Invoice
  • order_id=”” accepts a number. Ex: 23

simple shortcode with default attributes:


shortcode with all atts customized:

[wcpdf_download_invoice link_text="Download your invoice" order_id="23"]

If you’re working directly in template files, you can also use this PHP code:

<?php echo do_shortcode('[wcpdf_download_invoice]'); ?>