Dprime Woo Attachment v1.5.0 Pro WooCommerce
Add downloadable PDFs and Word documents to WooCommerce products. Nine predefined types, secure file serving, and a filterable type list.
Installation
- Install and activate WooCommerce and Dprime Core.
- Download Dprime Woo Attachment from your account at my.dprime.au.
- Install and activate it. It appears under Dprime > Woo Attachment in your admin sidebar.
- Open any product and click the Attachments tab to start adding documents.
Adding attachments
- Open any WooCommerce product in the editor.
- Click the Attachments tab in the Product Data panel.
- Click Add Attachment, pick a type from the dropdown, then click Upload to open the Media Library.
- Repeat for each additional file.
- Save the product. The list appears on the product page automatically.
Attachments appear in the order you added them. No separate ordering UI is needed.
Supported types
| Label | Slug |
|---|---|
| Manual | manual |
| Specs | specs |
| Installation Guide | installation_guide |
| Warranty | warranty |
| Datasheet | datasheet |
| Brochure | brochure |
| Certificate | certificate |
| Size Guide | size_guide |
| Other | other |
The full list is filterable via dpwat_attachment_types. See Filters below.
Accepted file formats
| Format | MIME type | Extension |
|---|---|---|
application/pdf | ||
| Microsoft Word | application/msword | .doc |
| Word OpenXML | application/vnd.openxmlformats-officedocument.wordprocessingml.document | .docx |
Files of any other type are rejected at upload time by the Media Library type filter and again at serve time by the MIME allowlist.
File serving
Customers download through a PHP endpoint, not direct file URLs. This means the download works on hosts that block direct access to wp-content/uploads. Each URL contains a fresh nonce. The MIME allowlist is enforced on every request.
If an attachment was uploaded before this plugin was installed and has no stored file ID, it falls back to the direct URL. Attachments uploaded through the plugin UI always go through the endpoint.
Filters
| Filter | Purpose |
|---|---|
dpwat_attachment_types | Filter the array of available type labels. Receives an associative array of slug => label pairs. Add industry-specific types or remove ones you do not use. |
// Example: add a Compliance Report type add_filter( 'dpwat_attachment_types', function ( $types ) { $types['compliance_report'] = 'Compliance Report'; return $types; } );
Override classes
/* Admin */ .dp-wat-list { /* unordered list on Help tab */ } .dp-wat-upload-btn { /* Upload button on each attachment row */ } .dp-wat-clear-btn { /* Remove (X) button on each attachment row */ }