diff --git a/lib/Form/Renderer.php b/lib/Form/Renderer.php index 807b3269ee..b0be305403 100644 --- a/lib/Form/Renderer.php +++ b/lib/Form/Renderer.php @@ -5,7 +5,6 @@ namespace MailPoet\Form; use MailPoet\Form\Util\Styles; use MailPoet\Settings\SettingsController; use MailPoet\Subscription\Captcha; -use MailPoet\WP\Functions as WPFunctions; class Renderer { /** @var Styles */ @@ -46,37 +45,42 @@ class Renderer { public function renderBlocks(array $blocks = [], bool $honeypotEnabled = true): string { // add honeypot for spambots - $html = ($honeypotEnabled) ? - '' : - ''; + $html = ($honeypotEnabled) ? $this->renderHoneypot() : ''; foreach ($blocks as $key => $block) { if ($block['type'] == 'submit' && $this->settings->get('captcha.type') === Captcha::TYPE_RECAPTCHA) { - $siteKey = $this->settings->get('captcha.recaptcha_site_token'); - $html .= '