I found myself in a spot of bother: I have a page with an eBook you can read from the browser, access to which I sell through the WooCommerce. The idea is incredibly simple: on the front page is a link, that goes directly to that page. That page checks whether the user is logged in and has bought the product or not, and if not, it redirects him or her to the 'my-account' page with login form.
Question: Can I pass some GET parameter to the 'my-account', say like this:
http://example.com/my-account?redir=the-goodies
then process it, of course, to make everything supereasy for the user? He or she logs in and then is redirected back to the page with my eBook, or to the order if the eBook wasn't bought. I'd imagine such functionality is already present in WooCommerce, but I can not find it on the internet.
Maybe I am approaching it from the wrong perspective. I know there are hooks for redirect after login, but GET parameters would not be accessible anyway, am I correct?
I also sell a print version of the book, so universal, permanent redirect is not an option.
Thank you for your time and I appreciate any comments, or answers!