The script we are trying to queue will not be added, because “add_custom_script()” is called with no hooks. To make this work properly we must use the wp_enqueue_scripts hook. Some other hooks will also work such as init, wp_print_scripts, and wp_head.
Furthermore, since the script seems to be dependent on jQuery, it’s recommended to declare it as such by adding
array(‘jquery’) as the 3rd parameter.
plugin_dir_url( __FILE__ ).'js/jquery-custom-script.js',