Answer the question
In order to leave comments, you need to log in
How to delete a file loaded by a plugin?
Good day, there is a WordPress + WooCommerce online store , there is a WooCheckout plugin that allows you to upload files and found such a bug there, when I upload, for example, a picture is displayed there is a thumbnail of this picture and a couple more buttons, one of which is deletion, I click delete - the loading indicator just appears and that's it, you can reload the page, because absolutely nothing happens next, I tried to reinstall this plugin, but without results.
I decided to try to clear the input with type='file' myself, I was looking for options, here is one of them:
<form>
<input id="file" type="file">
</form>
<button onclick="reset($('#file'))">Reset file</button>
window.reset = function(e) {
e.wrap('<form>').closest('form').get(0).reset();
e.unwrap();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question