Code

Discussion on WooCommerce Upload Files

Discussion on WooCommerce Upload Files

Cart 7,569 sales
Recently Updated

vanquish supports this item

Supported

4906 comments found.

Hello guys! Great plugin, thank you!

I have some experiince with php coding and may be you can give me some simple way to customize your plugin.

I need to give users additional possibility to choose 1 picture from those that the site offers or upload own picture.

Question – what is simple way to set my preloaded image url in plugin field? https://saldumuveikals.lv/product/test/ https://drive.google.com/file/d/1VNKtwYVt7Cmkq9c6cTsCJnGC5zxWmzFW/view?usp=sharing

I bought your plugin to do that and hope that i can customize it just a little – just explaine me where you save product additional url or file attachment id?

Thanks!

Hi,
thank you for your appreciation :)

I’m sorry, but the plugin is not designed to offer that feature and there isn’t a simple way to achieve that. It would require to redesign several subcomponents, so I cannot suggest in a few lines how to achieve that :(

Note also that the plugin has to be used as it is, it is not meant to be customized. Doing so, it may lead to unexpected behaviour making the plugin to not properly work.
In addition, I’m sorry, but the support service doesn’t include any customization service. It is mean to be used to report eventually issues :(

Upload data is stored, before the order is placed, is stored in the user session. Once the order has been placed, data is stored in order metadata.
An example of two upload fields, each one associated to the product with id “9”, each having two files can be seen here:
array(2) {
  ["21-9"]=>
  array(11) {
    ["absolute_path"]=>
    array(2) {
      [0]=>
      string(44) "dropbox:/woocommerce-demo/54/79652_test2.pdf" 
      [1]=>
      string(44) "dropbox:/woocommerce-demo/54/21145_test3.jpg" 
    }
    ["url"]=>
    array(2) {
      [0]=>
      string(96) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2F79652_test2.pdf" 
      [1]=>
      string(96) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2F21145_test3.jpg" 
    }
    ["original_filename"]=>
    array(2) {
      [0]=>
      string(15) "79652_test2.pdf" 
      [1]=>
      string(15) "21145_test3.jpg" 
    }
    ["source"]=>
    array(2) {
      [0]=>
      string(7) "dropbox" 
      [1]=>
      string(7) "dropbox" 
    }
    ["title"]=>
    string(23) "Upload test (Product 1)" 
    ["num_uploaded_files"]=>
    int(2)
    ["id"]=>
    string(4) "21-9" 
    ["user_feedback"]=>
    string(0) "" 
    ["ID3_info"]=>
    string(4) "none" 
    ["quantity"]=>
    array(2) {
      [0]=>
      string(1) "1" 
      [1]=>
      string(1) "1" 
    }
    ["is_multiple_file_upload"]=>
    bool(true)
  }
  ["24-9"]=>
  array(11) {
    ["absolute_path"]=>
    array(2) {
      [0]=>
      string(47) "dropbox:/woocommerce-demo/54/img1.png" 
      [1]=>
      string(74) "dropbox:/woocommerce-demo/54/img2.jpg" 
    }
    ["url"]=>
    array(2) {
      [0]=>
      string(99) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2img1.png" 
      [1]=>
      string(126) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2img2.png" 
    }
    ["original_filename"]=>
    array(2) {
      [0]=>
      string(18) "23266_image.PNG" 
      [1]=>
      string(45) "86700_image.jpg" 
    }
    ["source"]=>
    array(2) {
      [0]=>
      string(7) "dropbox" 
      [1]=>
      string(7) "dropbox" 
    }
    ["title"]=>
    string(18) "Test 2 (Product 1)" 
    ["num_uploaded_files"]=>
    int(2)
    ["id"]=>
    string(4) "24-9" 
    ["user_feedback"]=>
    string(0) "" 
    ["ID3_info"]=>
    string(4) "none" 
    ["quantity"]=>
    array(2) {
      [0]=>
      string(1) "1" 
      [1]=>
      string(1) "1" 
    }
    ["is_multiple_file_upload"]=>
    bool(true)
  }
 }

The array indexes are composed using this format {upload_id}-{product_id}. In this case, the upload field ids are 21 and 24 and the product has id 9.

User session saves and retrieves processes are managed by the WCUF_Session.php component located in the classes\com folder.

I, however, strongly recommend to not alter any plugin component.

Hi, need some help cause buying button is still missing

Thank you for sharing. I think to have found the cause: It seems to be related to ajax request sent by the page to load the upload field for the preselected variation of that product.

More in specific: by default, for a variable product, fields are shown only after a variation has been selected. This is performed by sending an ajax request to the server, that returns the upload area (and eventually uploaded files) for that variation.

In your case, a variation is preselected. This usually doesn’t lead to any issue. But in your case, when the plugin tries to load the upload area, it receives a bad response from your server: https://www.dropbox.com/s/tt4pvt7c91etsm5/wcuf_ajax_response.png?dl=0

I’ve then analyzed where the ajax request is sent: https://www.dropbox.com/s/k8exx6n6mrouzyg/wcuf_ajax_url.png?dl=0

your server sends it to the www.pacx.com.br instead of the www.statgin1.pacx.com.br.

If you have altered WordPress in any way in order to run it in that staging server, make also sure that the native admin_url() function (https://developer.wordpress.org/reference/functions/admin_url/ ) points to the staging server. That function is used to create ajax URL where to send requests. Now it seems to be still pointing to your production server.

Once fixed, you should no longer experience the issue! :)

Nice, tks for the explanation, so, once I push the edited staging clone to Live on pacx.com.br domain it should work fine right?

Ive didnt made any changes on wordpress to run staging server, I just clone the domain In staging application through c panel on siteground.

tks for attention

yes, moving to the production site, shoudn’t make you exprience that issue :)

Meanwhile, If you enjoyed my efforts to assist you and/or my plugin please consider leaving the 5 stars, I would really really appreciate! :)
(to leave a rating: go to your profile page, click on “Downloads” and from there you can rate to your purchases).

Getting an error on the upload configuration page:

uncaught reference error: sv_wp_job_batch_handler is not defined on script: https://www.printplaygames.com/wp-admin/admin.php?page=woocommerce-files-upload line: 21877

Is this your plugin issue or another conflicting plugin?

the plugin doesn’t define any “sv_wp_job_batch_handler” in its scripts. It seems that a 3rd party plugin is injecting some of its javascript code (without properly including its javascript libraries) in any admin page (it should instead include only in its admin pages). This causes the issue you reported.

You can do two things:
  1. go in the Options menu and under the Force reloading 3rd party javascript libraries select Yes: https://www.dropbox.com/s/i3hw7ka40mashra/wcuf_3rd_js.jpg?dl=0
  2. if still exeprience the issue, try disabling all the 3rd party plugins. Once done, if you are not experience the issue, enable one by one until you find the interfering one and report to its developer in order to if it

Hi there, I want to export my upload file url into .xls format which im using WP All Export – http://www.wpallimport.com/export/. I have found and pick the meta _wcuf_uploaded_files, but result in blank data. the plugin support php function for each meta field. Should I add some function into that field in order to retrieve the URL? thanks.

Hi,
the _wcuf_uploaded_files metakey contains a serialized array that contains several metadata associated with the uploaded files (like absolute path, files URL, file names, storage type and so on).

To export the data, you have to programmatically process that metakey.

An example of that array structure for two upload fields, each one with two files associated can be seen here:
array(2) {
  ["21-9"]=>
  array(11) {
    ["absolute_path"]=>
    array(2) {
      [0]=>
      string(44) "dropbox:/woocommerce-demo/54/79652_test2.pdf" 
      [1]=>
      string(44) "dropbox:/woocommerce-demo/54/21145_test3.jpg" 
    }
    ["url"]=>
    array(2) {
      [0]=>
      string(96) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2F79652_test2.pdf" 
      [1]=>
      string(96) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2F21145_test3.jpg" 
    }
    ["original_filename"]=>
    array(2) {
      [0]=>
      string(15) "79652_test2.pdf" 
      [1]=>
      string(15) "21145_test3.jpg" 
    }
    ["source"]=>
    array(2) {
      [0]=>
      string(7) "dropbox" 
      [1]=>
      string(7) "dropbox" 
    }
    ["title"]=>
    string(23) "Upload test (Product 1)" 
    ["num_uploaded_files"]=>
    int(2)
    ["id"]=>
    string(4) "21-9" 
    ["user_feedback"]=>
    string(0) "" 
    ["ID3_info"]=>
    string(4) "none" 
    ["quantity"]=>
    array(2) {
      [0]=>
      string(1) "1" 
      [1]=>
      string(1) "1" 
    }
    ["is_multiple_file_upload"]=>
    bool(true)
  }
  ["24-9"]=>
  array(11) {
    ["absolute_path"]=>
    array(2) {
      [0]=>
      string(47) "dropbox:/woocommerce-demo/54/img1.png" 
      [1]=>
      string(74) "dropbox:/woocommerce-demo/54/img2.jpg" 
    }
    ["url"]=>
    array(2) {
      [0]=>
      string(99) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2img1.png" 
      [1]=>
      string(126) "http://sito.com/demo?dropbox_get_item_link=%2Fwoocommerce-demo%2F54%2img2.png" 
    }
    ["original_filename"]=>
    array(2) {
      [0]=>
      string(18) "23266_image.PNG" 
      [1]=>
      string(45) "86700_image.jpg" 
    }
    ["source"]=>
    array(2) {
      [0]=>
      string(7) "dropbox" 
      [1]=>
      string(7) "dropbox" 
    }
    ["title"]=>
    string(18) "Test 2 (Product 1)" 
    ["num_uploaded_files"]=>
    int(2)
    ["id"]=>
    string(4) "24-9" 
    ["user_feedback"]=>
    string(0) "" 
    ["ID3_info"]=>
    string(4) "none" 
    ["quantity"]=>
    array(2) {
      [0]=>
      string(1) "1" 
      [1]=>
      string(1) "1" 
    }
    ["is_multiple_file_upload"]=>
    bool(true)
  }
 }
in your case then, before exporting, if you want to process programmatically that array to extract the URLs to the files, You have to read that metakey and extract the data you need as follows:
$data = $order->get_meta( '_wcuf_uploaded_files', true);
$paths = array();
foreach($data as $upload_field_id => $upload_field_data)
{
$paths[$upload_field_id] = $upload_field_data['url'];
}
the $order is the order object (that can be created using the native WooCommerce function wc_get_order() ).
The $paths will be an associative array (the key will be the upload field id) in which each element is an array of absolute paths to the files associated to each upload field.

You can then use that info to export as you wish.

Hello there,

I’ve forget my old account so i’ve created a new one, i had this plugin for a while.. i’ve did an update today and now they are showing me the fields in EDIT PRODUCT PAGE and they’re mandatory and can’t get rid of them, i even deleted the fields and create new ones but old ones still there.. check picture https://prnt.sc/pagzf9

https://prnt.sc/pagzph

Yes, without a valid purchase and support license, I cannot confirm your purchase and check if you are eligible for support. Just contact the Envato help team, they will help you to retrieve your account login data.

@vanquish, they can’t help me, i’m not remembering my account name or email.

I’m sorry I cannot help you then.

However from the screen you shared, I’ve just noticed that you are <strogn>not using the WooCommerce Upload Files plugin.
The plugin doesn’t any field on the admin product edit page. It also cannot be updated through the normal WordPress system (to update it has to be manually downloaded from CodeCanyon or by using the Envato updater system: https://goo.gl/pkJS33).

So most likely you are confusing the plugin you are using with the WooCommerce Upload Files plugin plugin.

Hi, Im having an issue with the plugin, when enabled on some product the buy button goes missing with Loading please wait message instead fixed

I’m sorry, to request support you need to renew your support license.

For now, what I can say is to try giving a look to the browser error console to see if any further error message is reported and to try disabling the other 3rd party plugins to see if you still experience the issue. Make also sure you are running the latest 51.8 plugin version.

If you renew your license, if you send me login data (admin access to the wp-admin area and FTP access) I can try performing some further analysis to see if it possible to have more clues about the issue.

We have a lot of files that for some reason are ending up in the tmp folder and not appearing on the customer’s order. When an item goes to temp, can it also have the customer’s name as well as the unique number, that way it can be easier to identify and pull it out of there to manually attach it to their order? We had 2,000 files in that folder after about 6 months of using this plugin.

It sounds very strange. Files stored in the tmp folder are automatically deleted after 20 minutes of inactivity. That setting can be set through the Options menu -> Temp files clear interval (minutes). I’m sorry, but the plugin is designed to use randomly generated names in order to avoid different files from different users to be accidentally overwritten. It cannot be easily modified.

If files are not properly associated to the order, in the Options menu, under the Checkout – Files to order association method area, select the When the order is placed option.

Make also sure that you are running the latest 51.8 version and that folder has the right permissions. Check also the permissions of those files. Try eventually to enable the WordPress debug mode, perform some tests and give a look to the debug.log located in the wp-content/ folder and to the server error log to see if any further clue is reported.

Hello sir.

I have products that require the customer to upload more than 1 file in different feilds, however I have 2 issues:

1- When I upload a small file “empty word file” it keeps telling me that: upload in file progress, for a very long time.

2- When I upload files in 1 field, the upload option in other fields disappear.

I use Astra theme if that matters. Thank you

Hi,
  1. without any further clue, it is quite hard to determine the cause. Could you try disabling the other 3rd party plugins and see if you experience the issue? If not, enable one by one until you find the interfering one.
  2. Yes, it is the normal behaviour. While an upload process is in progress, the user cannot use the other upload fields.

Hello Vanquish,

I have a problem with translation the term “Loading, please wait..” I updated to the last version and in the previous version it worked in the texts part of the plugin, but now not anymore…

Can you help me?

Best Regards, Dimitri

Hi Dimitri, that text can be translated throught the Text menu. I’ve just performed some tests, and the translation/customization of that text are properly working.

Make sure you have purghed server and browser cache once you modified that text.

For further support, you need to renew your support license.

Is it possible to implement captcha before the user uploads the file?

I’m sorry, the plugin hasn’t such a feature :(

Hello

I have a Pre-Sales question.

Is it possible to enable the upload functionality in the order detail view in the user account area? We want to allow uploads for each order after it has been submitted. Thanks

Hi,
yes! to that just create a field and edit its visibility options:
  1. click the green button
  2. click the visibility tab
  3. uncheck all options and just check the option to display the field in the order details page
here a visual guide: https://www.dropbox.com/s/91plrlfdmlukcnl/wcuf_order_visibility.jpg?dl=0

In this way, the user will be able to upload files only thorough my account -> orders -> specific order details page.

The plugin has a demo site where you can fully test the software features in order to be sure it actually fits your need and expectations before purchasing. If you need further info, feel free to ask! :)

confirmed rotation does not work correctly even in you demo https://www.codecanyon.eu/wcuf/product/cat123/ it works once but stops.

yes, please retry performing a test now.

Hi could you check, there is a conflict on your plugin with other plugin that was already installed on the site:

PHP Fatal error:

Cannot redeclare GuzzleHttp\uri_template() (previously declared in /wp-content/plugins/woocommerce-upload-files/classes/vendor/guzzlehttp/guzzle/src/functions.php:17) in /wp-content/plugins/backup-and-restore/services/aws/GuzzleHttp/functions.php on line 31

Hi,
as you can see from the error message reported, the error is raised by the backup-and-restore plugin.

That plugin is redeclaring a function already defined by the DropBox API library included in the WooCommerce Upload Files.

For further support, you should, however, contact that plugin developer in order to eventually fix their script error.

Hi,

I noted that the file upload by customers can be downloaded from WooCommerce > Order

So it means the file is saved at our hosting…but I would like to know how to completely delete the file uploaded by customer? Is deleted the Order received can help?

I have to clear these files because I have limited space for hosting

Kindly advise

Hi,
yes files can be deleted through the admin order details page or the orders list page.

If you delete an order, associated files will be deleted.

Note that you can eventually store files in a DropBox account.

Hi, so I can delete the files instead of delete the order received?

If I delete the files in the order list page, it also can clear the hosting space right? Do I need to login cpanel to ensure the file is completely deleted?

*In case I don’t use Dropbox

Yes, you can delete just the files and not necessarily the order.

Once a file is deleted, it will be deleted from the host clearing space.

Hi, its impossible to acces to the options configuration

Hi,
could you provide a more detailed description of the issue? Could you use the demo site, and report me if you are experiencing the issue?

Please also make sure you are using an admin or shop manager user role to access the menu. Have you altered in any way user roles?
Make also sure that any 3rd party plugin is interfering: try disabling all of them to see if any is interfering.

Possible to add upload image button to thankyou page? I want it for that user varify payment by uploading a screenshot of bank transfer proof.

Hi,
yes for that just:
  1. create an upload filed
  2. edit its options by clicking the green button and click the visibility tab
  3. in the Page & form area, just select the option to display the field in the thank you page
  4. in the Payment gatway section, just enable the ones you need
That’s it!

The plugin has a demo site where you can fully test it before purchasing to be sure that that configuration actually works as you expect. If you need any further info, feel free to ask!

Thanks for your reply.

- I want to allow customers to upload images when they write a product review. Does your plugin do this job as well? Maybe add shortcode to comment template file, something like this, does it work by this way?

I’m sorry, the plugin hasn’t such a feature :(

Hi, A single question: At the Admin’s Order page, I see that we can download the files By Uploader ID. Is it possible to have a button to download ALL the uploaded files at once from ALL the fields?

Please have a look at the imeage here: https://www.encodica.com/tmp/up_01.jpg

Thank you

Hi,
good news, I’ve just released the new 51.7 version that now allows you to download all files as single zip: https://www.dropbox.com/s/tqco6emspba7zxz/wcuf_download_all_files.jpg?dl=0

You can manually download the new version via CodeCanyon or receive as an automatic update by installing and configuring the Envato updater plugin: https://goo.gl/pkJS33 (here the guide that explains how to configure: https://envato.com/market-plugin/ ). To manually update just deactivate and delete the old plugin version and then install the new one. Don’t worry you won’t lose any data :)

I hope you enjoy, if so…please consider leaving the 5 stars, I would really appreciate! :)
(to leave a rating: go to your profile page, click on “Downloads” and from there you can rate to your purchases).

Have a great day!

Was it good? :)

Hi, please consider leaving the 5 stars, it would help me with sales and I would really appreciate! :) (to leave a rating: go to your profile page, click on “Downloads” and from there you can rate to your purchases).

another question: if two customers are uploading files at the same time, are these files stored in different locations until the order has completed? I ask for the concern that the files may get mixed up if e.q. they have identical file names.

temporarly uploaded files are stored using random numerical names in a temp folder in order this kind of issue.

Once the order are completed, files are then moved to the final directory using the original file name an using a random numerical prefix in order to avoid files with identical names to interfere!

Nice, thank’s a lot. I switched to your uploader and it works like a charme.

Glad to hear that! :)

Have a great weekend! :)

can you show a demo of the crop with rotation running on a live server… I personally think it doesn’t work… and also let me see your php info to see what I need to enable.

if you do I will pay another year of support :)

You can have a preview in the demo site. Make also sure you are running the latest 51.6 plugin version.

The demo site doesn’t use any particular PHP configuration, it is a standard web shared hosting service.

Hello, how do I activate the Upload Functionality?

I have WooCommerce installed and one test product.

Within the Upload files configurator, I have an upload field set up to show for all product on the product page, but nothing shows. I tried switching to the default WP theme but it still doesn’t show.

Thanks

Hi,
make sure you have enabled the option to show the field in the product page and before the product has been added to cart: https://www.dropbox.com/s/9wbs32arhqk4fwt/wcuf_visibility_4.jpg?dl=0 .
Make also sure you have not enabled any visibility restriction option (by user role, payment gateway, etc.).
In case of variable product, you have first to chose a variation. The upload field will be displayed after selection.

Ok, got your private message. Check your inbox, the issue is related to the payment gatway visibility restriction options :)

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey