Google reCaptcha Integration

Configuration

↑ Back to top

To configure the plugin, go to WooCommerce > Settings > Google reCAPTCHA. The settings are split into four tabs: General Settings, WP Pages, WC Page, and Shortcode.

General Settings

↑ Back to top

Use this tab to choose your CAPTCHA provider, add its keys, and set who can skip the CAPTCHA. Only the provider you select is loaded on your store. Go to WooCommerce > Settings > Google reCAPTCHA > General Settings and configure:

  • CAPTCHA Provider: Choose the service that protects your forms:
    • Google reCAPTCHA
    • Cloudflare Turnstile
    • hCaptcha

Switching providers do not delete keys saved for the other providers, so you can switch back at any time.

  • Exclude By: Choose how to let selected visitors skip the CAPTCHA:
    • Countries: In Excluded Countries, enter the 2-letter codes of the countries to exclude (for example, US, IN).
    • IP Addresses: In Excluded IP Addresses, enter one IP address or range per line (for example, 192.168.1.1 or 192.168.1.0/24).
    • User Roles: In Excluded User Roles, add the user roles that should not see the CAPTCHA (for example, Administrator or Shop Manager).

Google reCAPTCHA Settings

↑ Back to top

These fields appear when Google reCAPTCHA is selected as the provider.

  • reCAPTCHA Version: Select a reCAPTCHA version:
    • Version 2 (Checkbox) to show the โ€œIโ€™m not a robotโ€ checkbox
    • Version 3 (Invisible) to check visitors in the background without any interaction
  • Domain Type: Select google.com or recaptcha.net. Use recaptcha.net if google.com is blocked in your customersโ€™ region.
  • Google Site Key: Enter the site key from the Google reCAPTCHA admin console.
  • Google Secret Key: Enter the secret key from the same console.
  • V3 Score Threshold: Applies to Version 3 only. Enter a score between 0.0 and 1.0 (default 0.5). Visitors who score below this value are treated as bots and blocked. A higher value is stricter.

Note: Make sure the keys match the reCAPTCHA version you select. Version 2 keys do not work with Version 3, and Version 3 keys do not work with Version 2.

Cloudflare Turnstile Settings

↑ Back to top

These fields appear when Cloudflare Turnstile is selected as the provider.

  • Turnstile Site Key: Create a widget in the Cloudflare Turnstile dashboard and copy its site key.
  • Turnstile Secret Key: Enter the secret key for the same widget.

When testing, use Cloudflareโ€™s test site key and secret key as a matching pair.

hCaptcha Settings

↑ Back to top

These fields appear when hCaptcha is selected as the provider.

  • hCaptcha Site Key: Enter the site key from the hCaptcha dashboard.
  • hCaptcha Secret Key: Enter the secret key from the same dashboard.

When testing, hCaptchaโ€™s test site key only works with its official test secret key.

  • Test Provider Keys: Click Test keys (server-side) to check that the provider accepts your site key and secret key. This only checks the keys. Still test a real form, such as login or checkout, after saving.

WP Pages Settings

↑ Back to top

Use this tab to add CAPTCHA protection to the default WordPress forms. Each form has its own section, so you can enable and style the CAPTCHA separately for each one. Go to WooCommerce > Settings > Google reCAPTCHA > WP Pages and configure:

The available forms are:

  • WP Login: the WordPress login page (wp-login.php)
  • WP Registration: the WordPress registration page
  • WP Lost Password: the WordPress lost password page
  • WordPress Comment Form: the comment form on posts and pages

Click a section to expand it. Each section has the following settings:

  • Enable reCAPTCHA: Check this box to show the CAPTCHA on the form.
  • reCAPTCHA Label: Enter optional text to show above the CAPTCHA, for example, โ€œPlease confirm you are human.โ€ Leave it blank to show no label.
  • reCAPTCHA Display Theme: Select Light or Dark to match your siteโ€™s design.
  • reCAPTCHA Display Size: Select Normal for the standard widget, or Compact for a smaller widget that fits narrow forms.

WC Pages Settings

↑ Back to top

Use this tab to add CAPTCHA protection to WooCommerce forms. Each form has its own section, so you can enable and style the CAPTCHA separately for each one. Go to WooCommerce > Settings > Google reCAPTCHA > WC Pages and configure:

The available forms are:

  • Login: the login form on the My Account page
  • Registration: the registration form on the My Account page
  • Lost Password: the lost password form on the My Account page
  • Guest Checkout: the checkout page for customers who are not logged in
  • Logged-in User Checkout: the checkout page for customers who are logged in
  • Pay for Order: the page where customers pay for an existing order, such as an order created by the admin
  • Product Reviews: the review form on product pages

Click a section to expand it. Each section has the following settings:

  • Enable reCAPTCHA: Check this box to show the CAPTCHA on the form.
  • reCAPTCHA Label: Enter optional text to show above the CAPTCHA, for example, โ€œPlease confirm you are human.โ€ Leave it blank to show no label.
  • reCAPTCHA Display Theme: Select Light or Dark to match your siteโ€™s design.
  • reCAPTCHA Display Size: Select Normal for the standard widget, or Compact for a smaller widget that fits narrow forms.

The Guest Checkout and Logged-in User Checkout sections also include:

  • reCAPTCHA Display Position: Choose where the CAPTCHA appears on the checkout page: After Payment Method or After Additional Information.

Shortcode Settings

↑ Back to top

Use this tab to add a CAPTCHA to custom forms that are not covered in the WP Pages or WC Pages tabs. Go to WooCommerce > Settings > Google reCAPTCHA > WC Pages and configure the settings:

  • Enable Shortcode: Check Enable to turn on the CAPTCHA shortcode.
  • Shortcode: Copy the shortcode [fme_recaptcha] and paste it inside your custom form, where you want the CAPTCHA to appear.
  • Theme: Select Light or Dark to match your siteโ€™s design.
  • Size: Select Normal for the standard widget, or Compact for a smaller widget that fits narrow forms.

Note: Place the shortcode inside the form, before the submit button. If it is placed outside the form, the CAPTCHA will not work on that form.


FAQs

↑ Back to top

Which CAPTCHA providers does the plugin support?

↑ Back to top

The plugin supports Google reCAPTCHA (Version 2 Checkbox and Version 3 Invisible), Cloudflare Turnstile, and hCaptcha. You can select the provider in General Settings.

Can I switch to another CAPTCHA provider later?

↑ Back to top

Yes. Select a new provider in the CAPTCHA Provider field and add its keys. The keys saved for your previous provider are kept, so you can switch back without entering them again.

Where do I get the site key and secret key?

↑ Back to top

Each provider has its own dashboard. Google reCAPTCHA keys come from the Google reCAPTCHA admin console, Cloudflare Turnstile keys from the Turnstile dashboard, and hCaptcha keys from the hCaptcha dashboard. The settings page links to each one.

How do I check that my keys are working?

↑ Back to top

Click Test keys (server-side) in General Settings to check that the provider accepts your keys. After saving, also test a real form, such as login or checkout, on your store.

Why canโ€™t customers submit forms after I enabled the CAPTCHA?

↑ Back to top

This usually means the site key or secret key is missing or incorrect. Protected forms stay blocked until valid keys are saved. Also make sure your Google reCAPTCHA keys match the version you selected, as Version 2 and Version 3 keys are not interchangeable.

Can I hide the CAPTCHA for certain users?

↑ Back to top

Yes. In General Settings, use Exclude By to skip the CAPTCHA for specific countries, IP addresses or IP ranges, or user roles.

Which forms can I protect with a CAPTCHA?

↑ Back to top

On the WordPress side, you can protect the login, registration, lost password, and comment forms. On the WooCommerce side, you can protect the login, registration, lost password, guest checkout, logged-in user checkout, pay for order, and product review forms. You can add a CAPTCHA to other forms with the [fme_recaptcha] shortcode.

Can I add a CAPTCHA to a custom form?

↑ Back to top

Yes. Enable the shortcode in the Shortcode tab, then paste [fme_recaptcha] inside your form, before the submit button.

Why is no CAPTCHA box showing on my forms with Google reCAPTCHA Version 3?

↑ Back to top

Version 3 is invisible. It checks visitors in the background and does not show a checkbox. You can control how strict it is with the V3 Score Threshold in General Settings.

What should I do if google.com is blocked for some of my customers?

↑ Back to top

Set Domain Type to recaptcha.net in General Settings. The reCAPTCHA will then load from recaptcha.net instead of google.com.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Offer add-ons like gift wrapping, special messages or other special options for your products.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.