I'm modifying some functionality of a theme i'm using, which already set up a .js
file inside a plugin to handle the paypal checkout process. I had to modify the code so I renamed a few elements and basically copied the old js file to a new file and made the changes.
It works and everything is fine, but I wonder if there's a better way to do it in Wordpress? It doesn't feel right to modify so much just so I could change a few lines of code inside.
Thanks!
.js
and enqueue the changed.js