Hey folks,
I figured out, that your plugin needs the WP Rest API. Plugins like “Disable WP REST API” will destroy the mechanism to mainly store the cookie settings. Behaviour is, that the cookie banner will display on every site, even if you allow everything.
Uncaught (in promise)
Response { responseJSON: {…}, type: "basic", url: "http://www.some-domain.com/wp-json/real-cookie-banner/…eferer=http%3A%2F%2Fwww.some-domain.com%2Faktuelles%2F", redirected: false, status: 401, ok: false, statusText: "Unauthorized", headers: Headers(14), body: ReadableStream, bodyUsed: true }
body: ReadableStream { locked: true }
locked: true
<prototype>: ReadableStreamPrototype { cancel: cancel(), getReader: getReader(), pipeThrough: pipeThrough(), … }
bodyUsed: true
headers: Headers(14) { "access-control-allow-credentials" → "true", "access-control-allow-headers" → "Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type", "access-control-allow-methods" → "OPTIONS, GET, POST, PUT, PATCH, DELETE", … }
ok: false
redirected: false
responseJSON: Object { code: "rest_login_required", message: "REST API restricted to authenticated users.", data: {…} }
code: "rest_login_required"
data: Object { status: 401 }
message: "REST API restricted to authenticated users."
<prototype>: Object { … }
status: 401
statusText: "Unauthorized"
type: "basic"
url: "http://www.some-domain.com/wp-json/real-cookie-banner/…eferer=http%3A%2F%2Fwww.some-domain.com%2Faktuelles%2F"
<prototype>: ResponsePrototype { clone: clone(), arrayBuffer: arrayBuffer(), blob: blob(), … }
Why is the REST Api important to the plugin at all?
Nevertheless, it is not stated in the description of the plugin, that the plugin needs for core functionality the REST API of WP.