Extending the above comment:
Directly changing the files of the plugin or theme is not a good practice as once the plugin/theme is updated, you will loose the changes. Instead use child theme in case of themes and hook to required actions in case of plugins.
In your case since you are only changing the script in plugin and they might have enqueued(they should be) with wp_enqueue_script
hooked to wp_enqueue_scripts
. You can dequeue that script using wp_dequeue_script
all you have to do is findout the script handle from the original plugin. Then you need to enqueue the changed script.
Related Posts:
- Getting a custom Gutenberg component’s state from outside that component
- Why my browser keeps loading old version of custom JavaScript files in \divi\js? [closed]
- How do I only load a plugin js on it’s settings pages?
- How can I change my javascript after it has been enqueued? [closed]
- Create Proper WordPress Ajax Request in JavaScript, NOT jQuery
- How to use wp-ajax in wp-cron
- Add extra parameter in tag using script_loader_tag
- Insert code after tag without using functions.php?
- How do I use WordPress PHP functions in my Javascript code?
- Adding with javascript to admin bar. Works in Chrome/Safari, not Firefox
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- Passing select control value to block
- How do I store information in a dynamic block in WordPress?
- Reuse javascripts from plugins within the theme
- WP-Cufon adding extra space in my paragraphs in Firefox and Chrome
- W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]
- Pass a php string to a javascript variable
- Problem in loading javascript in footer
- add mediaelement.js plugins into WordPress video player control bar
- Shortcode button dosent work for all posts. Work for first post only
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- React JSX in WordPress Plugin Development
- Internationalization autocomplete JS variable
- Best approach to fetch data from wp options to js file or php file
- Can someone please tell me what is wrong with my plugin?
- Scripts at the end of the page
- wordpress site | All-in-one-cufon IE Issue
- Enqueue WordPress plugin scripts below all other JS
- How to add Internationalization in WordPress using Javascript/React?
- Can I use custom CSS and js plugin to put JavaScript in to validate my forms
- How to get the element ID from new menu list that added with add_filter()?
- Time consuming callbacks in customizer
- Modifying a .js Function for Print [QZ Tray, WooCommerce POS]
- Executing Javascript when a New Post is Published
- Is there a standard way to listen for an on change event of a posts featured image
- Trying to create a private area custom for each user where they upload images to a server [closed]
- How to insert HTML/JavaScript form into WordPress page? [closed]
- Add custom JavaScript that is a combination of CDN/uploaded files and easily-edited code?
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- Using TinyMCE in plugin?
- GeoMashup plugin: how to customize cluster markers / icons? [closed]
- How can I remove the WordPress-Version (?ver=5.x) from my plugin
- Remove / overwrite some functions in buddypress.js
- wordpress add_action() issue in ajax call
- Localizing methods for jQuery append prepend wrap parent
- how to insert a HTML form into a javascript popup?
- Display a consistent Google Plus icon on ALL pages of my site
- Which plugin can do horizontal scrolling of RSS feeds in WordPress [closed]
- get specific value of a array | PHP
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Conditional custom redirect
- Load CSS files in header of Bones theme?
- how to request a script more than once in wordpress
- How to turn off automatic operation for Nivo Slider?
- How to enqueue some javascript source once per page
- JS Plugin not executing the js correctly. Trying to make all internal links scroll smoothly
- Call javascript functions from each page
- Wp-minify doesn’t seem to minify my JS code
- Ajax call not working in wordpress through a plugin
- Javascript fetch on wordpress plugins not working
- Jquery POST Ajax Return null data in wordpress
- Stop a script on a single page
- Validating ajax search
- Cannot run script properly with my custom plugin
- Overriding inline !important CSS with Javscript code snippet with media query
- Add style to body based on url
- Performing CRUD operations on front end in wordpress
- How to add specific script to WordPress webpage that will working with user input and databases
- Ajax Call not Working in Plugin
- How to create a custom block in Gutenberg with multiple checkboxes?
- Add external javascript to post template
- Why can I not deregister my style and script on custom post type?
- AJAX update fails for public/non-admin users
- Javascript inserted from Plugin pointing to wrong location
- Speeding up WordPress on a Local Network
- Conditional Fields depending on checkboxes
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to pass value from WordPress to Javascript
- Facebook Quote Plugin for Blockquote?
- Adding javascript to header of MetroMagazine theme
- Embed Javascript code to registered users only
- Javascript in plugin not working
- Jetpack Comments Change Placeholder Text
- Media Playlist Plugin
- Adding an onchange event to a custom dropdown menu in WordPress
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- Possible jquery / library conflict in plugin usage
- Plugin and javascript placement
- Why won’t the Comprehensive Google Map Plugin load?
- get_option include in my adsense
- Expanding / Collapsing Modules in WordPress Panel
- Move specific javascript to the footer
- making a simple plugin
- Javascript as Jquery Function Call?
- How to access values from your own settings page in javascript?
- Refresh server side rendered block in Gutenberg without changing attributes or its content
- How do I call an action hook into wp_ajax hook callback function
- I want to display data last 7 days with date wise in chartjs?
- this code is fiven by chat-gtp but nothing match even I key in the value of a cell. help!
- Use custom Javascript for a custom Elementor Widget [closed]