How to fix the JS error in console on checkout with recaptcha in Magento 2.4?

In Magento 2.4.3, you may get an error in the console when checking out with Google reCAPTCHA when not enabled.

To fix this issue, enable Google reCAPTCHA for checkout in Magento. Go to Stores > Configuration > Security > Google reCAPTCHA Storefront > Storefront. Set Enable for Checkout/Placing Order to Yes. Google reCAPTCHA requires a pair of API keys to enable this feature. Instructions on how to do that are found here:

If you do not wish to enable Google reCAPTCHA for checkout, you can disable it in Magento. Run the following command:

bin/magento mo:dis Magento_ReCaptchaCheckout -c

You will also need to recompile.

Leave a Reply

Your email address will not be published.