A plugin vendor I’m getting support from recently suggested that if I didn’t want a certain Javascript file within the plugin to be enqueued, I should go into the plugin’s files and comment out the enqueueing. However, this will potentially have to be repeated each time I update the plugin. Is there a way to un-enqueue a plugin’s script from functions.php in my child theme so that the change will "stick"?
2
Answers
Yes there is, the native WordPress function is called
wp_dequeue_script
.@see https://developer.wordpress.org/reference/functions/wp_dequeue_script/
Example