$this->buildComponentForm($this->_id, $this);
}
- if (count($this->_paymentProcessors) >= 1 && !$this->get_template_vars("isCaptcha") && $this->hasToAddForcefully()) {
+ if (count($this->_paymentProcessors) >= 1 && !$this->get_template_vars("isCaptcha") && \Civi::settings()->get('forceRecaptcha')) {
if (!$this->_userID) {
CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($this);
}
return (bool) \Civi::settings()->get('recaptchaPublicKey');
}
- /**
- * Check if reCaptcha has to be added on form forcefully.
- */
- public static function hasToAddForcefully() {
- return (bool) \Civi::settings()->get('forceRecaptcha');
- }
-
/**
* Add element to form.
*