File Type and Category Restrictions
Two store-owner restrictions live in the Documents card on the Pro Settings tab. Both are optional. Leaving a field empty means “no restriction”.
Allowed file types
Section titled “Allowed file types”A multi-select of the formats a seller may attach for preview:
- Uploaded files: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT.
- Cloud links: Google Docs, Google Sheets, OneDrive, Dropbox.
This restriction is remove-only. It narrows the base plugin’s supported formats to the subset you allow. It cannot enable a format the base plugin does not already support.
How it is enforced:
- On the product page, a document whose format is not in your allowed list is not shown as previewable.
- A cloud service link (Google, OneDrive, Dropbox) stays allowed as long as you still permit at least one cloud service in the list.
- When a document is saved, its URL and file type are validated against the allowed set, and an invalid file type is rejected with a message listing the permitted formats.
Allowed categories
Section titled “Allowed categories”A multi-select of product categories. When set, only products in one of the chosen categories will show a preview. Products outside those categories show no preview button.
When both a category restriction and a file-type list are configured, the product document metabox title also shows a short note reminding the seller which file types are allowed.
- Both lists are stored inside the
wcdp_pro_admin_general_optionoption (file_formatandwcdp_category). - On first activation, and once for existing installs, Pro pre-fills the file-type list with all supported formats and the category list with every existing product category, so nothing is hidden until you deliberately narrow it.

