• Resolved radoslaws

    (@radoslaws)


    Hello,
    It’s possible to download an invoice like a downloadable product? I need the invoice to be downloaded in the order summary after payment. It should also be downloaded from the e-mail (just like downloadable product woo product).

    THX

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @radoslaws

    It’s possible to download the Invoice in the thank you page using the shortcode.

    To download it in the e-mail you need to attach it to the “New order email” under WooCommerce > PDF Invoices > Documents > Invoice > Attach to.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    In addition to what my colleague @alexmigf said, if you want to see the link in the single order details (My Account > Orders > Order #{number}), please add the following code snippet to your site:

    add_action('woocommerce_order_details_after_order_table_items', function(){
    	if( ! is_admin()){
    		echo do_shortcode('[wcpdf_download_invoice]');
    	}	
    }, 10, 1);

    This will add the invoice link after the Order details heading:

    A screenshot displaying the Download invoice PDF link after the Order details heading

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Invoice as downloadable product’ is closed to new replies.