Enfold Theme dynamically loads the Google Recaptcha Script, which connects the form with Google reCAPTCHA (/wp-content/themes/enfold/framework/js/conditional_load/avia_google_recaptcha_api.js
) via JavaScript. This means that Real Cookie Banner cannot block the script via the HTML (learn more about how our content blocker works).
Content Blocker rules in Real Cookie Banner:
*google.com/recaptcha*
*gstatic.com/recaptcha*
form[id^="enfold-form-"]
Potential solution:
Enfold needs to wait for consent, if the consent API is available, and afterwards load the Google reCAPTCHA script:
(window.consentApi?.unblock("https://www.gstatic.com/recaptcha/") || Promise.resolve()).then(() => {
var i = document.createElement('script');
i.id = 'avia-google-recaptcha-api-script';
i.type = 'text/javascript';
i.src = AviaReCAPTCHA_front.avia_api_script;
document.body.appendChild(i)
});
Please feel free to join our Slack channel and contact me "Matthias Günter" for further API implementation.