Deactivate JS Script in Plugin Shortcode
When shortcodes are evaluated, the header of the site has already been assembled. So if the shortcode wants to enqueue a script it must do so in the footer (by setting the last parameter to wp_enqueue_script to true. At this point you’re still not too late to prevent the file from actually being included in … Read more