{"id":15862446,"date":"2022-07-27T06:18:16","date_gmt":"2022-07-27T06:18:16","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/plugin-not-rendering-scripts-when-accepted\/"},"modified":"2022-07-27T06:18:16","modified_gmt":"2022-07-27T06:18:16","slug":"plugin-not-rendering-scripts-when-accepted","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/plugin-not-rendering-scripts-when-accepted\/","title":{"rendered":"Plugin not rendering scripts when accepted"},"content":{"rendered":"<p>Hi all.<br \/>\nLove the plugin, but I&#8217;m noticing it&#8217;s not reliably rendering the scripts when I click accept once refreshed.<\/p>\n<p>Sometimes it works on the index page in an incognito window.<\/p>\n<p>It&#8217;s possible it&#8217;s interacting weirdly with SWUP, an ajax page loader we have on the site?<br \/>\nOr perhaps it&#8217;s storing the &#8216;declined&#8217; value somewhere else? (I&#8217;m checking Inspector &gt; Application &gt; cookies &lt; [the site])<\/p>\n<p>I&#8217;m basically wanting to show a notice on the donation page if they don&#8217;t have cookies active (as they&#8217;re necessary). But checking for a custom cookie that&#8217;s generated when the blocked scripts appear isn&#8217;t working (as the blocked scripts aren&#8217;t being added back).<\/p>\n<p>I was also trying to use the cn_cookies_accepted(); function, but it kept saying it couldn&#8217;t find it.<\/p>\n","protected":false},"template":"","class_list":["post-15862446","topic","type-topic","status-publish","hentry","topic-tag-ajax","topic-tag-render","topic-tag-script","topic-tag-script-blocking"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15862446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15862446\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15862446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}