plugin_dir_path URL is adding a bunch of web host info to the path
-
Can anyone help? When I try and get the path to the plugin directory I’m getting an error in the console as it’s trying to find the JS file. When I echo the path using the function below it looks OK but when I try to execute the code then I see an error in the console as it’s following that path which is I think the CDN path or something.
wp_enqueue_script( 'airtable_request', plugin_dir_path( __FILE__ ) . 'js/airtable_request.js');
Console error: https://11xz2i2xd3npg3c1z78d2-wpengine.netdna-ssl.com/wp-content/plugins/daxxxet-quote-plugin/js/airtable_request.js?ver=5.8
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘plugin_dir_path URL is adding a bunch of web host info to the path’ is closed to new replies.