Determine the URL to download a PDF invoice directly?
-
Loving the plugin, thanks!
I manage most of my WC sales through Excel, and part of that process is to save/archive PDF invoices for all of my orders by clicking a link in Excel that navigates to the WC order page, and then I right-click on the “PDF Invoice” button, to “Save link as…”
That causes the browser to navigate/save the URL in the format:
https://adventuretaco.com/wp-admin/admin-ajax.php?action=generate_wpo_wcpdf&document_type=invoice&order_ids=[id]&access_key=[nonce]
What I’d like to do is have the link I click in Excel navigate me directly to the PDF invoice download URL. I can generate that URL entirely in Excel except for the
access_key=[nonce]
.If I try to access the URL without the
access_key
, I get the error:You do not have sufficient permissions to access this page. Reason: empty access key
Is there a way to generate a URL that will still require me to be logged in to the site in the browser, but not require the
access_key=[nonce]
on the querystring?If not, could such a feature be added? Why is the existing auth session cookie (or whatever WP users natively to authenticate users for all other resources) not used in this situation?
- You must be logged in to reply to this topic.