Ryohei Tokimura
asked 8 years ago

Google CAPTCHA is not work. Version 1.4.3.2

3 Answers
DominicStaff
answered 8 years ago

I have checked on our demo and it’s bug come from DWQA Captcha plugin, to resolve this issue, you can open the dwqa-captcha.php file and add the following code under line 58.

    add_settings_field( 
            'dwqa_options[captcha-google-public-key]', 
            __( 'Google reCaptcha v2 Site key', 'dwqa' ), 
            array( $this, 'gc_public_key_display' ), 
            'dwqa-settings', 
            'dwqa-captcha-settings'
        );

        add_settings_field( 
            'dwqa_options[captcha-google-private-key]', 
            __( 'Google reCaptcha v2 Secret key', 'dwqa' ), 
            array( $this, 'gc_private_key_display' ), 
            'dwqa-settings', 
            'dwqa-captcha-settings'
        );

And add the following code under line 75 (after added the previous code lines)


   public function gc_private_key_display() {
      global $dwqa_general_settings;
      $private_key = isset( $dwqa_general_settings['captcha-google-private-key'] ) ?  $dwqa_general_settings['captcha-google-private-key'] : '';
        echo '
<input type="text" name="dwqa_options[captcha-google-private-key]" value="'.$private_key.'" class="regular-text">';
    }

    public function gc_public_key_display() {
        global $dwqa_general_settings;
        $private_key = isset( $dwqa_general_settings['captcha-google-public-key'] ) ?  $dwqa_general_settings['captcha-google-public-key'] : '';
        echo '
<input type="text" name="dwqa_options[captcha-google-public-key]" value="'.$private_key.'" class="regular-text">';
    }

Note: We will fix and update this issue into plugin.
Hope this helps!

Ryohei Tokimura
answered 8 years ago

Thank you very much.
For a while, you use the old version.
I will wait for the updates that have been fixed.

dominic Staff
replied 8 years ago

Yes, we will update and release it as soon as possible.

Roland Husk
answered 8 years ago

Thank you for posting.It is very useful one.keep sharing with us.. I’ve understand your stuff previous to and you’re just too wonderful.

Powered by DW Question & Answer Pro