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

  1. Install and activate WooCommerce and Dprime Core.
  2. Download Dprime Woo Attachment from your account at my.dprime.au.
  3. Install and activate it. It appears under Dprime > Woo Attachment in your admin sidebar.
  4. Open any product and click the Attachments tab to start adding documents.
Requires an active Dprime subscription. Licence verification is handled by Dprime Core. During the grace period the plugin keeps serving files with a warning; after the grace period it pauses but no attachment data is lost.

Adding attachments

  1. Open any WooCommerce product in the editor.
  2. Click the Attachments tab in the Product Data panel.
  3. Click Add Attachment, pick a type from the dropdown, then click Upload to open the Media Library.
  4. Repeat for each additional file.
  5. 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

LabelSlug
Manualmanual
Specsspecs
Installation Guideinstallation_guide
Warrantywarranty
Datasheetdatasheet
Brochurebrochure
Certificatecertificate
Size Guidesize_guide
Otherother

The full list is filterable via dpwat_attachment_types. See Filters below.

Accepted file formats

FormatMIME typeExtension
PDFapplication/pdf.pdf
Microsoft Wordapplication/msword.doc
Word OpenXMLapplication/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

FilterPurpose
dpwat_attachment_typesFilter 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 */ }