Enqueue scripts inside a class in a plugin
By the time your widget (or sidebar if this is hard-coded) loads you have already missed the wp_enqueue_scripts hook, which runs in the header and that means that you have missed the window for registering the script in the <head> at all, which you are trying to do– there is no fifth parameter that would … Read more