Upload fields allow you to add upload fields to your WooCommerce product.
To add an upload field, just choose ‘Upload’ from the ‘Field Type’ dropdown list.
If you’d like to enable AJAX uploads, go to WooCommerce > Settings > Product Add-Ons and check the option to ‘Enable AJAX uploader’.
AJAX gives a better user experience, including displaying upload status and progress and thumbnails for all uploaded files.
It also allows you to charge a price per uploaded file and set the maximum number of uploaded files.
- Allow multiple uploads – check this to allow the user to upload more than one file per upload field
- Price per upload – check this to multiply the field price per the number of uploaded files (only available when using the AJAX upload method)
- Maximum files – enter the maximum number of files that can be uploaded to this field (only available when using the AJAX upload method)
Where are uploaded files stored?
Files are uploaded to the wp-content/uploads/product-extras directory. If you prefer, you can upload files to directories based on order number.
To upload files to separate directories for each order, go to WooCommerce > Settings > Product Add-Ons and enable ‘Organise uploads by order’.
How to download uploaded files
You can access the uploads in a number of ways:
- You can view the files directly from the order screen
- If you have the ‘Organise uploads by order’ option selected, you can click the ‘Download files’ button to download all uploads per order in a single zip
- You can use FTP to access the uploads folder directly
How to rename uploaded files
You might want to rename uploaded files. You can do this by entering the new file name format in ‘Rename files’.
You can use a number of dynamic tags which will be replaced by information about the file, including:
Uploading different file types
By default, the plugin will allow you to upload the following file types:
Uploading PDF files
If you’d like to enable PDFs as a file type, go to WooCommerce > Settings > Product Add-Ons and check the option to ‘Enable PDF uploads’.
Uploading other file types
To upload other file types, please see this article.
Setting the maximum file size for uploads
Uploading without logging in
As a security measure, users are required to log in before uploading a file. If you wish to allow any user to upload files, go to WooCommerce > Settings > Product Add-Ons and ensure the ‘Users must be logged in to upload’ setting is deselected.
There’s an extensive tutorial on uploading files to WooCommerce products here.