Support » Plugin: WordPress ReCaptcha Integration » WooCommerce 3.0 Registration Error [solved]

  • So even though the plugin author said he’s no longer updating this plugin:

    I’ve still been using it on my woocommerce registration page to prevent bots from creating accounts. However, since updating to woocommerce 3.0, the reCAPTCHA no longer appears on the woocommerce registration form. (which you normally see when you go to however when someone tries to create an account, they still get the error that the reCAPTCHA box wasn’t checked, even though there’s no box.

    The reCAPTCHA still works on the default wordpress registration page: and the hook “registration_form” that made the checkbox appear on that page also made it appear on the woocommerce page as well, but only prior to 3.0.

    Go to the plugin folder /wp-recaptcha-integration/inc/, and edit the file “class-wp_recaptcha_woocommerce.php” You’ll see on line 61 that the comment talks about this:
    “// displaying the captcha at hook ‘registration_form’ already done by core plugin”

    However now we know it no longer does this in woocommerce 3.0, so we I had to inject the code manually. So I added this code right below that comment:

    add_action('woocommerce_register_form' , array($wp_recaptcha,'print_recaptcha_html'),10,0);

    And that fixed this particular issue for me. I hope this helps someone.

    • This topic was modified 1 year, 5 months ago by  MrFent37.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thanks so much โ€” worked for us!

    Thanks, good stuff ๐Ÿ™‚



    That does the trick, thanks!!

    Too bad there is no cleaner way to do this, than to edit plugin code… Not possible via functions.php or something?



    I’m sure it’s probably possible, but I don’t have the time to figure out how to make it work outside of the plugin. I figure since the plugin is no longer being updated, it didn’t matter if I just edit the plugin code itself.



    Seems like it is active again as a new version was just released ๐Ÿ™‚
    Maybe it would be good to submit a Pull Request in Git? I did no see any change for WooCommerce in the changelog.

    Because I had 2 WordPress instances with different WooCommerce version, I applied a classic WC version condition with your fix

    if ( class_exists( 'WooCommerce' ) ) {
       global $woocommerce;
       if ( version_compare( $woocommerce->version, '3.0', ">=" ) ) {
    	add_action('woocommerce_register_form' ,array($wp_recaptcha,'print_recaptcha_html'),10,0);

    Dear plugin author Jรถrn,

    Can you please take into account this fix for WooCommerce 3+? Hence we can update your plugin to the latest version. Thanks & keep up the good work!!

    Best regards,

    I submitted a Pull request in the GitHub project

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WooCommerce 3.0 Registration Error [solved]’ is closed to new replies.