Error: Google reCAPTCHA verification failed. on LearnPress forms
-
The Simple Google reCAPTCHA plugin does not add the necessary HTML structure to the LearnPress plugin forms. The scripts, CSS and JS are loaded into the page, which presents the first problem, it tries to validate the reCAPTCHA that doesn’t exist.
I did a test, adding in the
$sgr_display_list
list of thefrontend()
method the hook of the form that I need to add the reCAPTCHA (in this case the hook islearn-press/after-checkout-account-login-fields
) and it worked perfectly.My suggestion is to add a filter to this list (and also to the
$sgr_verify_list
list) so developers can add or remove items from them.Something like:
$sgr_display_list = apply_filters( 'sgr_display_list', $sgr_display_list );
$sgr_verify_list = apply_filters( 'sgr_verify_list', $sgr_verify_list );
If you have a plugin repository, I can send a PR with this collaboration.
Thanks.
- The topic ‘Error: Google reCAPTCHA verification failed. on LearnPress forms’ is closed to new replies.