• Resolved vectogravic

    (@vectogravic)


    Hello, nice plugin, i need a little help, is it possible to add/display the download file/link on the PDF invoice?

    Thanks in advance

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

    (@alexmigf)

    Hello @vectogravic

    I’m assuming that non logged in users should be able to access the document from the link right?

    Thread Starter vectogravic

    (@vectogravic)

    Yes, the guest and logged in user can see the file download link on the invoice.

    Plugin Contributor alexmigf

    (@alexmigf)

    I think only the full access can work here, because when you are creating the link (PDF generation) you are logged in, so a nonce will be used and it will fail later in every access scenario (guest or logged in). Resuming, any person that has access to the link will have access to the document. Is that what you want?

    • This reply was modified 1 year, 2 months ago by alexmigf.
    • This reply was modified 1 year, 2 months ago by alexmigf.
    Thread Starter vectogravic

    (@vectogravic)

    Thanks for the quick reply.

    every guest and logged-in user will immediately get a download link on the thank you page after checkout is complete, and a PDF invoice too if we place it there, I want the download link for this file to also be on the PDF invoice (like the default invoice/order receipt from WooCommerce which contains file download link). Do you think this is something possible?https://www.dropbox.com/scl/fi/fn1wj56px5ab4hrms4hsa/inv.jpg?rlkey=vo59gksmzy44eptmjrkzqz4et&dl=0

    Plugin Contributor alexmigf

    (@alexmigf)

    Ah sorry, I misunderstood what link was. Please try the code snippet below:

    add_action( 'wpo_wcpdf_after_item_meta', function( $document_type, $item, $order ) {
    	if ( 'invoice' === $document_type && ! empty( $item['item'] ) ) {
    		wc_display_item_downloads( $item['item'], array( 'show_url' => true ) );
    	}
    }, 10, 3 );

    If you never worked with filters/actions, please read this documentation page: How to use filters

    • This reply was modified 1 year, 2 months ago by alexmigf.
    Thread Starter vectogravic

    (@vectogravic)

    Excellent… thank you, i can now display the download link on the invoice. Very helpful, great support ??

    Plugin Contributor alexmigf

    (@alexmigf)

    You’re welcome ??

    Have a nice day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Woo Download URL’ is closed to new replies.