-
Search Results
-
Good morning, I need to know if it’s possible to do this. I need to create a restricted area with about a thousand products inside. To speed up the upload process, I’d like to start by manually creating all the categories and tags. Then, I’d upload just one product and export it to a CSV file using the appropriate add-on. At that point, I’d manually modify the CSV file by adding rows for all the products, including their URLs, names, categories, tags, etc.
Do you think it’s possible to populate the database this way?
Topic: Package page not public
I have created a package for each user of the website. When I create a package in the “Access” option I remove “All visitors” and I select only the specific user I need. This way noone else can download the files uploaded for that user.
The issue is that his download page URL is still visible and public and you can see the list of all his files names.
Example: https://gbfersrl.it/download/slug-of-package/
Even if a visitor can’t download any file, it is a privacy issue to show the names of the downloads.
So far I have solved the issue by creating this snippet that hides the subpages of the download page from logged out users,
add_action('init', 'restrict_download_subpages_to_logged_in_users'); function restrict_download_subpages_to_logged_in_users() { // Get the current path $request_uri = $_SERVER['REQUEST_URI']; // Check if the URL starts with /download/ and is not exactly /download/ if (preg_match('#^/download/.+#', $request_uri)) { // If user is not logged in, redirect to login if (!is_user_logged_in()) { wp_redirect(home_url()); exit; } } }HOWEVER I need a solution in order to show the entirety of the package url only to the user I have attributed the Access to.