In order to display an invoice download button, add the below code for example to your “thank you” page or “customer-completed-order” email template.
echo do_shortcode( '' );
For use in WordPress editor use below shortcode. This will only work if you replace “ORDER_ID” with an actual order id.
Note: Download button will only be displayed when PDF exists and order has been paid.