I have to add a JavaScript function on a button click inside a plugin, i’ve tried but every time i update the plugin the function get removed how can i add permanently the function?
I have to add a JavaScript function on a button click inside a plugin, i’ve tried but every time i update the plugin the function get removed how can i add permanently the function?
2
Answers
There are plugins that allow you to add code that won’t be erased on upgrade. This is one.
If you have many customizations, you may want to consider creating your own plugin
You should disable the plugin update using filter.
Because everytime you update the plugin it will replace the plugin files with new one.