Skip to content

getRecaptchaSettings()

The getRecaptchaSettings method is used to get a RecaptchaSettings object that represents settings for reCAPTCHA in the storefront.

Returned value

The RecaptchaSettings object.

Example

source
{% set settings = ObjectApi.getRecaptchaSettings() %}
{% if settings.getSiteKey() is not empty %}
    <h4>reCAPTCHA site key is set</h4>
{% endif %}
output
<h4>reCAPTCHA site key is set</h4>