impress-org / givewp-snippet-library

A collection of code snippets to enhance or expand on the free Give WordPress Donation Plugin.
https://givewp.com
140 stars 90 forks source link

Recaptcha Snippet should work as intended #134

Open jobst opened 2 years ago

jobst commented 2 years ago

User Story

I am trying to get the recaptcha to work. It loads, displays, but when I click the tick box, the green tick never shows up. I used the web developer tools, the class "recaptcha-checkbox-unchecked" for the tick box never changes to "recaptcha-checkbox-checked"

I have also contact 7 form installed, it the recaptcha v2 quite happily works there.

Details

I cannot see errors, this is the problem

Expected Behavior

The tick box should end up with a green tick

Steps to Reproduce

This is hard to show as the form is still been developed and is not live.

  1. I downloaded the code for the recaptcha
  2. saved it to a php file
  3. included the with a require in the function.php file
  4. went to a donation page I haev created
  5. the recaptcha loads just aboce the donate button
  6. clicking on it never gets the green tick

Visuals

There are no errors. The tickbox never gets a green tick when clicking on it.

Additional Context

Do not know what to write here

System Information

Centos 7.X php 7.3X apache 2.4X latest givewp

Acceptance Criteria

It would be nice if someone can make a suggestion so it works.

mathetos commented 2 years ago

Hi @jobst

There's a new plugin that implements reCaptcha for Give really well. It's 3rd party, but it does the trick.

I'd recommend trying this rather than tinkering with this old snippet. https://wordpress.org/plugins/recaptcha-give/

Let us know how it goes.

jobst commented 2 years ago

Let us know how it goes.

I have installed that, too - I can see the recaptcha but the tick never gets green.

Looking at the code via webdeveloper the class responsible for the tick stays "recaptcha-checkbox-unchecked". I never goes to "recaptcha-checkbox-checked", because of this I can never move on.

jobst commented 2 years ago

As I now have figured out all recaptchas (including mine, the one from github and Ben Marshall's plugin) indeed work if you use the LEGACY form, as soon as you switch to the mulitpage form it does not work properly!

petebocken commented 2 years ago

Also noting that this plugin requires reCAPTCHA v2. It will not work with v3.