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:
- force enqueue script to be first in order of prominence
- Modifying a JS file with data from plugin settings
- How can I reduce the amount of files loaded/included per plugin?
- Why my browser keeps loading old version of custom JavaScript files in \divi\js? [closed]
- How do I sanitize a javascript text?
- How can a Firebase user registration and login be integrated into a WordPress site?
- How do I make my wordpress page more friendly for mobile viewers?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Check javascript file Proper way in functions.php
- how would I include a js file with tags into wordpress?
- How to use wp-ajax in wp-cron
- Dequeue / Deregister script and replace it with a new plugin
- Add extra parameter in tag using script_loader_tag
- Insert code after tag without using functions.php?
- Google Maps and Yandex Maps doesn’t work correctly
- Adding with javascript to admin bar. Works in Chrome/Safari, not Firefox
- Prevent CSS/JS loading when plugin is not used
- Creating an Exit Confirmation Popup
- Passing select control value to block
- Reuse javascripts from plugins within the theme
- Localiztion in javascript
- WP-Cufon adding extra space in my paragraphs in Firefox and Chrome
- Best approach to fetch data from wp options to js file or php file
- wordpress site | All-in-one-cufon IE Issue
- How to add Internationalization in WordPress using Javascript/React?
- Change upload folder for a CPT
- How to get the element ID from new menu list that added with add_filter()?
- Override Plugin Script Fucnction in WordPress
- Modifying a .js Function for Print [QZ Tray, WooCommerce POS]
- Is there a standard way to listen for an on change event of a posts featured image
- How to insert HTML/JavaScript form into WordPress page? [closed]
- How to get DEFER or ASYNC attribute to appear when I add a stylesheet with wp_enqueue_style from a plugin? [duplicate]
- Using window.onload with Ubermenu
- Is there a loading priority for login_enqueue_scripts?
- Delay JavaScript files from loading
- “Conflict” with jQuery (or its plugins)?
- how to prevent all css and javascripts files from loading
- How to execute a plugin on a single page only?
- MediaElement.js works on one site but not the other?
- Pass user role to javascript code inside body
- How to get specific string/value from an array? php [closed]
- Access post title from custom meta box on title change
- Background Music WP [closed]
- Why does my jQuery plugin show up as text in WordPress?
- Adding a simple Javascript file with a plugin
- Disable submit button order
- Social share buttons text shows up on post excerpts
- Dropdown menu on click change
- How do I override all stylesheets and scripts without a plugin
- Plugin Admin panel checkbox unchecked after submit
- Custom Plugin scripts from admin working in frontend
- Send Array from JS to php file then insert it in wp database through a plugin
- Gutenberg: Prevent links from being clickable in the block. Error: “Cannot destructure property ‘frameElement’ of ‘r’ as it is null.”
- How to override Plugin javascript function : $(‘body’).on(‘change’,’.class’)
- Connect / Login WordPress Hosted Website or Blog with NodeJs
- login form should redirect to register page for in 1st login next time it should redirected to home page
- Javascript embedded disappears for editors
- How to fetch WordPress database values in JavaScript widget
- Possible way of having multiple Gutenberg instances for a page?
- Woocommerce add products to cart
- Show popup on click
- how i retreive the post content while editing it in real time however the editor is tinymce or gutenberg
- How to properly enqueue jQuery knob on WordPress without conflict?
- Javascript not getting injected into page
- Why does my custom plugin only function correctly once per page?
- How to get a specific string from a url
- Does anybody know how to insert a complete jquery plugin into a wordpress elementor-page?
- JS working when used normally but not in wordpress
- How can I create a secure file download in WordPress?
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- WordPress site hamburger menu toggle not working
- Woocommerce – Change variations output
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- Customizer preview URL not updating when settings reset to default
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- how to send two forms with one click (script ninjaforms id)
- wp_enqueue_scrpts seems not to get called
- Link in navigation menu send user to different page if mobile?
- show-hide based on select option jquery wordpress
- Speed issues because of CSS & JavaScript
- Having trouble going from Jfiddle to implementing in WordPress :(
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Creating a user ‘add custom field’ section
- Javascript not working
- Creating custom URL for async content
- Need to hide an element depending on date and post category
- How do I convince this button to do something when it is clicked?
- contact 7 plugin stops some pages from working properly
- Element works, but not on wordpress site [duplicate]
- how woocommerce swatch color name when hovered or selected
- How to create post comparison in wordpress
- WordPress shortcode plugin not working
- FacetWP: Plugin breaks button/modal functionality inside searchable content area
- TypeErrors with Yoast, jQuery in conflict?
- Count div with class (.length) only shows 0 [closed]
- how to show selected options drop down menu values in attributes field in after saving post.php
- Vanilla javascript in custom gutenberg block not working
- How to get selected variation from URL?
- Elementor Form : client side javascript validation