Hi,
I hacked the form login (woocommerce/my account) with google recaptcha for front end users,
and it is working good, but hacking the plugin template is not a good idea as it will gone every time when the plugin get updated.
if using the enfold parent theme, I would put it into the config-woocommerce file
but now I am using the child theme, when I should put ?
Hey YongyanLi,
No, you can put it in functions.php of your child theme, if you want to modify the template there’s an instruction in woocommerce where you need to create a woocommerce folder and put the template files where you want to replace and it wouldn’t be gone during plugin updates.
Best regards,
Nikko
Hi, Nikko
yes, so I don’t want to hack in the plugin as it will gone after updates
so if the google Recaptcha can be activated by functions.php only, where the below code(step one) to put into?
step 1:
I’ve inserted following code before the < / head > tag of form-login.php:
<script src=’https://www.google.com/recaptcha/api.js’></script>
and this one inside form tab in file “woocommerce\myaccount\form-login.php”:
<div class=”g-recaptcha” data-sitekey=”xxxxxxxxx MY ID xxxxxxxxx”></div>
step 2: and then later validate the reCaptcha response in functions.php
Hi,
Did you try the following solution?
Best regards,
Ismael