diff --git a/lib/Form/AssetsController.php b/lib/Form/AssetsController.php index cb4b9dd20a..a38cac8858 100644 --- a/lib/Form/AssetsController.php +++ b/lib/Form/AssetsController.php @@ -35,7 +35,12 @@ class AssetsController { $this->wp->wpPrintScripts('jquery'); $this->wp->wpPrintScripts('mailpoet_vendor'); $this->wp->wpPrintScripts('mailpoet_public'); - echo ''; + + $captcha = $this->settings->get('captcha'); + if (!empty($captcha['type']) && $captcha['type'] === Captcha::TYPE_RECAPTCHA) { + echo ''; + } + $scripts = ob_get_contents(); ob_end_clean(); if ($scripts === false) {