Please try below code –
function fixUlisting() {
wp_deregister_script( 'stm-search-form-category' );
wp_dequeue_script( 'stm-search-form-category' );
wp_enqueue_script( 'stm-search-fix', plugins_url().'/ulisting-search-fix/stm-search-fix.js' );
}
add_action( 'wp_enqueue_scripts', 'fixUlisting', 100 );
Related Posts:
- React JSX in WordPress Plugin Development
- Pass $this to function nested in another public function of the same class
- Enqueue WordPress plugin scripts below all other JS
- How can I remove the WordPress-Version (?ver=5.x) from my plugin
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- force enqueue script to be first in order of prominence
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- When can you get current page ID and initialize hooks right after?
- enqueue script only if it is not already enqueue
- Which method is best to enqueue scripts
- How do I only load a plugin js on it’s settings pages?
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Declaring script dependencies between scripts enqueued with different action hooks
- Use js script from one plugin in another plugin
- How to Reload the Dashboard After Clicking Update in Quick-Edit?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Add extra parameter in tag using script_loader_tag
- Insert code after tag without using functions.php?
- Is it possible to add an action to the currently running action?
- Custom data-id wp_enqueue_script
- How do I use WordPress PHP functions in my Javascript code?
- Can’t get JS code to work with shortcode
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- wp_enqueue_scripts not working inside shortcode
- Passing select control value to block
- wp_enqueue_script fails to include in footer
- How to create popup same as wordpress popup feature
- Has anyone used require.js for handling plugin scripts?
- Passing RichText attributes to function onChange
- How do I store information in a dynamic block in WordPress?
- Where does WordPress register default scripts like jQuery?
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- Problem in loading javascript in footer
- How to load plugin after page is loaded – pagespeed issues
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- Use wp_enqueue_scripts from included php file
- Best approach to fetch data from wp options to js file or php file
- Making a plugin only available on the front-end for the logged in super admin
- Updating the Drag-To-Share eXtended share URLs?
- How to add Internationalization in WordPress using Javascript/React?
- wp.media javascript issue with on select
- jQuery for custom plugin not working with Divi theme
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- Is there a loading priority for login_enqueue_scripts?
- Delay JavaScript files from loading
- Why am I unable to load scripts in head in plugin?
- Deactivate JS Script in Plugin Shortcode
- Remove / overwrite some functions in buddypress.js
- Add type to enqueued script inside plugin
- How to generate an all in one WordPress New content, plugin and theme update report on a website? [closed]
- How to use custom Javascript code inside a plugin?
- Enqueue script: link not working in page source
- Custom CSS not being added by plugin
- how to request a script more than once in wordpress
- why the wp_register_script doesn’t work for register_activation_hook
- How to enqueue some javascript source once per page
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- Why won’t wp_enqueue_script work within any plugin file?
- wordpress plugin add page when activate
- Fixed: Console.log twice in the edit function
- Cannot run script properly with my custom plugin
- Add style to body based on url
- How to properly enqueue jQuery knob on WordPress without conflict?
- Problem with wordpress has_action() function
- Multiple image selection custom widget
- Why can I not deregister my style and script on custom post type?
- Create a form and have custom menu display based on user answers?
- AJAX update fails for public/non-admin users
- plugins_url not returning correct directory
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- How do I keep children of certain parent menus expanded by default on a sidebar?
- How to use information from the database in the front-end?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to pass value from WordPress to Javascript
- Javascript in plugin not working
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Creating a user ‘add custom field’ section
- Need to hide an element depending on date and post category
- Ajax, jQuery and WordPress
- Plugin – including external javascript calling google maps
- get_option include in my adsense
- Is it possible to run javascript on plugin deactivated?
- Ajax in Plugins: returns the whole page
- Enqueue scripts in the footer
- Load css classes after using ajax calls
- How to create post comparison in wordpress
- Trying to use wp_register_script/style and enqueu them from an array – getting an error [duplicate]
- How to access values from your own settings page in javascript?
- wp_enqueue_script doesn’t load JS in plugin
- Vanilla javascript in custom gutenberg block not working
- Ajax gives 400 error
- Executing Javascript when a New Post is Published
- breadcrumb need to show all pages and subpages
- Change Woo Custom Endpoint Titles from a Plugin
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- How to update changes to multiple sites at the same time
- Why am I getting an error when requiring a file in my plugin?