I have webstore on woocommerce, and on one of my wordpress pages (that page is not woocommerce page, but just wordpress and it is edited by Colibri free theme) I have download links for some products.
And I want to make some of those links to be able to download without restrictions which already works fine. But for some links I need to make redirection to login page if user is not logged in.
I have no idea how to start.
At the moment I suppose I need to use in some way
is_user_logged_in() method. And I suppose I need to use it in
functions.php file. But have no idea how?
Should I use in some way
add_action? But how to add filter/action to exact links from page which I don't even know where to find on FTP server?
I am sorry I am still totally newbie and I can't find the exact answer in jungle of threads on google and on stackexchange.
I suppose I should first pass any wordpress/php course. But at the moment I need to provide that one functionality as soon as possible. And have no idea how to start.
For any help great thanks in advance,