404 when enqueue_script using plugin_url
plugins_url will output the absolute file path of the plugins directory in your WordPress install. This of course won’t work for a client (browser) calling a script. To access scripts from the plugins directory, you’ll want to use plugin_dir_url() which will get you the url of the plugin directory. Some things to note about plugin_dir_url() … Read more