Sorry to necro this thread after over two years. This has been the most relevant thread relating to a use case I'm trying to work on.
My goal is to be able to put guest user downloads on the same domain behind a location that can in turn be excluded from the page cache. Similar to what is done here with my-account/downloads
.
The problem I am trying to figure out now is how to apply a similar solution for guest users at the order-received
wc_endpoint_url
.
The recommended solution works great for logged in users.
I have tried several iterations using some of the available Woocommerce filters and search for "download", but can't get a working implementation.