Block Script Enqueue until Cookie consent
-
Hello,
due to GDPR I need to block the javascript file (which sets a cookie) until the user does an optin using a third party cookie consent plugin.
Is it possible to dequeue the js file included in class-hubwoo-public.php in line 73 (wp_enqueue_script( ‘hs-script-loader’, ‘//js.hs-scripts.com/’ . $portal_id . ‘.js’, array( ‘jquery’ ), WC_VERSION, true );) and put that JS file include into my cookie plugin? So that it gets loaded right after the user accepts cookies? Or might this break things?
I would really appreciate an answer, Thank you.
The topic ‘Block Script Enqueue until Cookie consent’ is closed to new replies.