Hi,
I see what is the problem. Also change the code:
return '
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?onload=onloadCallbackHKRecaptcha&render=explicit&hl='.$locale.'" async defer></script>
<script type="text/javascript">var onloadCallbackHKRecaptcha = function() { window.hkCaptchaWidget = grecaptcha.render(\'hika-recaptcha\', '.$params.'); '.$js.'};</script>
<div id="hika-recaptcha" class="hika-recaptcha"></div>';
to:
return '
<script type="text/javascript">
var onloadCallbackHKRecaptcha = function() {
window.hkCaptchaWidget = grecaptcha.render(\'hika-recaptcha\', '.$params.');
'.$js.'
};
var scriptTag = document.createElement(\'script\');
scriptTag.src = "https://www.google.com/recaptcha/api.js?onload=onloadCallbackHKRecaptcha&render=explicit&hl='.$locale.'";
scriptTag..defer = true;
document.body.appendChild(scriptTag);
</script>
<div id="hika-recaptcha" class="hika-recaptcha"></div>';
in that same file and it should work.