Krokedil Product Documents makes it easy for you to display and send documents to your customers related to a specific product.
Installation
↑ Back to top- Download the .zip file from your WooCommerce account.
- Go to: WordPress Admin > Plugins > Add New and Upload Plugin the file you have downloaded.
- Install Now and Activate.
Setup and Configuration
↑ Back to top- Include documents – Add a section to order emails containing links to related documents. When this feature is activated, and a product with a document assigned to it exists in an order, the email sent to the customer will include a new section with links to the documents.
- Display tab – Check this box to display documents in a custom product tab. Documents can also be displayed via the shortcode [kpd_documents]

Add documents to a product
↑ Back to top
- Add one or several documents to the product.
- Drag and drop the display order of the documents.
- Change the title of the documents.
- Change the documents tab name displayed in the front-end.
- Click on the Add new files button.
- Select the document you want to assign.
- Click the Update button in the top right Publish metabox.
- If you want to change the document title or reorder the documents display order, make sure to Update the product again when you’re finished.
Front-end view
↑ Back to top
Customizing the icons
↑ Back to topkpd_document_icon
.
You can modify the icons in the following way:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use together with Krokedil Product Documents pluign. | |
* https://krokedil.com/product/krokedil-product-documents/ | |
* | |
* Filter kpd_document_icon | |
* In this example we change icons for xlxs, docx & svg files. | |
* | |
* @param string $icon_url The url to the icon. | |
* @param string $file_type The attached document file type (pdf, jpg etc). | |
* @param int $post_id Current product post ID. | |
* @param string $file_name The attached document file name. | |
*/ | |
add_filter( 'kpd_document_icon', 'custom_kpd_document_icon', 10, 4 ); | |
function custom_kpd_document_icon( $icon_url, $file_type, $post_id, $file_name ) { | |
switch ( $file_type ) { | |
case 'xlsx': | |
$icon_url = 'https://mydomain.com/custom-xlsx.png'; | |
break; | |
case 'docx': | |
$icon_url = 'https://mydomain.com/custom-docx.png'; | |
break; | |
case 'svg': | |
$icon_url = 'https://mydomain.com/custom-svg.png'; | |
break; | |
} | |
return $icon_url; | |
} |
Questions & support
↑ Back to top- Please get in touch with us if you have any questions before you buy the plugin.
- Have you already purchased the plugin and need some assistance – create a ticket an we will help you.