Adds a “Downloads” tab and displays a link to any document attached to the product. Includes filetype icons for pdf, docx, and xlsx. The Title of the file is displayed as the link.
In order for this to work, the document has to be attached to the product. A file can only be attached to a single post/page/product as it’s a parent-child relationship. So, if you want a particular file to show up as a download for multiple products, then you’ll have to upload that file multiple times.
The easiest way to attach a file to a product (or any other post type) is to click the Add Media button on the product edit page for that product and upload the file there. You don’t have to actually click the Insert into Product button, though, unless you actually want it to show up in the content as well.
An easy way to check to see what is attached to a particular product is to click the Add Media button, make sure you’re on the Media Library tab, and select Uploaded to this product and only files attached to the product will display.
I welcome any feedback to make this easier to use for other cases.