How to Add Google reCAPTCHA to WooCommerce

Security is now the most important concern for any website or e-commerce business. It’s possible that automated tools and bots are affecting your website’s performance. The spamming of your website can be accomplished using a variety of technological methods. If you allow them to register and log into your WooCommerce store, they’ll attempt to place fraudulent orders. A lot of money is going to be spent on this, and your SEO rankings are going to suffer because of it. Today, we will show you how to create a reCaptcha in WooCommerce in order to protect your online store’s efficiency from spam.

Google reCaptcha for WooCommerce – Methods

There are two basic methods to add Google reCaptcha for WooCommerce.

  1. Google reCaptcha for WooCommerce by Koala Apps
  2. Add Google reCaptcha for WooCommerce Programmatically

Method #1: Google reCaptcha for WooCommerce by Koala Apps

Google reCaptcha for WooCommerce plugin lets you add Google reCaptcha to your WooCommerce & WordPress pages, more specifically login, registration, and password reset pages. For the purpose of keeping out spammers, the Google reCaptcha plugin serves as an additional security barrier. Only suspicious visitors will see the captcha when you use the ReCaptcha plugin, protecting your important customers.

Installation

  1. To install this plugin, search the .zip file from your WooCommerce account and download it.
  2. From the WordPress Admin Panel, Go to Plugins and choose Add New. After that Upload Plugin.
  3. Choose the .zip file you have downloaded.
  4. Choose Install Now, then Activate the plugin..

Setup and Configuration

After activating the Google reCaptcha for WooCommerce plugin, a new menu option “reCaptcha” will appear in your WordPress Admin menu. The settings can be accessed by clicking on this option.

Supports V2 and V3 reCaptcha Versions

The Google reCaptcha plugins support V2 and V3 keys. 

How to get reCaptcha Keys:

You can get your reCaptcha keys for free from here.

For the reCaptcha keys, you must be logged into your Gmail account. Here, you can buy V2 or V3 keys. Only when suspicious traffic is detected does the V3 appear, while the V2 keys allow you to show reCaptcha under each form. The reCaptcha logo will appear in the bottom right corner of every page where you have activated reCaptcha.

Enable reCaptcha from General Settings

The Google ReCaptcha plugin can be activated by adding “site key” and “secret key” to the general settings tab. As a reminder, when you are adding reCaptcha keys, please select either V2 or V3.

WooCommerce google reCAPTCHA

Enable reCaptcha on Specific Pages

With the Google reCaptcha plugin, you can enable reCaptcha on certain pages after the reCaptcha keys have been added. The reCaptcha can be activated by clicking on the page tab where you want to use it. Using this plugin, you can add reCaptcha on the following pages:

  • WooCommerce Registration
  • WooCommerce Login
  • WooCommerce Password Reset
  • WooCommerce Checkout
  • WooCommerce Payment Method on Checkout
  • WooCommerce Pay for Order
  • WordPress Login
  • WordPress Registration
  • WordPress Password Reset
WooCommerce google reCAPTCHA

Customize reCaptcha

The plugin offers you to customize reCaptcha titles, themes, and sizes.

Method #2: Add Google reCaptcha for WooCommerce Programmatically

Let’s take a look at the program-based implementation of Google reCaptcha for WooCommerce.

public function captcha_v3_woo_registration() {
?>
<input type= "hidden" value="true" name="grecaptcha_required" class="grecaptcha_required"></input>
<?php

if (wp_script_is('ka_cap_v3_admin_scr')) {
return;
} else {
$this->ka_captcha_my_load_scripts_v3();
}
}
add_action('woocommerce_register_form', array( $this,'captcha_v3_woo_registration'));// woo registration

To Conclude

We hope this article was helpful in explaining how you can add a Google reCaptcha in WooCommerce. If you come up with any further queries, do not hesitate to contact our support team for answers.

Sign up to get Latest Updates

For more digital insights, sign up for the latest updates and industry news right in your inbox.