Why WordPress plugin_dir_path now connecting my JS and CSS Files.
I am learning WP plugin development from a YouTube tutorial. The code is working in the video but the person is using local host environment. Whilst the code is not working on my side. I am using live hosting environment.
The plugin_dir_path is connecting the main plugin file and other php files added with require() function but it is throwing critical error when I try to use plugin_dir_path() to link the js and css files. Any Idea what is the issue
if plugin_dir_path(); is working fine to connect the main plugin file then keep using it to define the plugin directory path. But for the JS and CSS files use plugin_dir_url( ); instead.