1. Knowledge Base
  2. WooCommerce Protected Categories
  3. FAQ

Can I protect files, images and PDF’s attached to protected categories?

If you’re using the WooCommerce Protected Categories or Password Protected Categories plugins, then they will protect your category pages and all the products/posts within these protected categories. The plugins will not protect any Media Library files that are linked to your protected content, such as featured images or downloadable PDF files.

The files will be accessible to anyone who has the direct link to the image in your media library. However, if they only appear on products or posts that are in a protected category, then it’s unlikely that any unauthorized visitors will ever get the link. For added security, you could also check whether your SEO plugin allows you to noindex specific images, just in case.

For even greater security of your files, you could use WooCommerce Protected Categories or Password Protected Categories with the Prevent Direct Access plugin. This lets you restrict access to your media files for logged in users, specific user roles, etc. If you choose the same type of protection as your protected categories, then the protected media files will automatically be unlocked whenever someone unlocks a restricted category.

Please note that the Prevent Direct Access plugin works best with the user role protection option in WooCommerce Protected Categories or the Private categories option in Password Protected Categories. This is because you can restrict the media files so that they are available to the same user role as your protected categories, thus creating a seamless experience for your users. When they log into their user account with the correct role, both the protected category AND the attached media files will be unlocked at the same time.

You can use Prevent Direct Access with categories that you protect using a simple password, but this won’t automatically unlock the media files and you will need to think more carefully about the user journey when they unlock your protected content.

Still need help?
If searching the knowledge base hasn't answered your question, please contact support.

Related Articles