Captcha and Message - by Capra - on WordPress WooCommerce support

This topic has 2 replies, 2 voices, and was last updated 8 years, 3 months ago ago by Eva Kemp

  • Avatar: Capra
    Capra
    Participant
    January 14, 2016 at 13:48

    Hi

    How do I remove or disable captcha in Contact form.
    Also how do I change the text that appears when the form is incomplete when sent.
    For Example “The security code you entered did not match. Please try again.”

    Best regards
    /cc

    1 Answer
    Avatar: Eva
    Eva Kemp
    Support staff
    January 14, 2016 at 15:03

    Hello,

    To remove captcha you need edit the file shortcodes.php in wp-content/themes/woopress/framework directory and comment the code in lines 435-440:

    $captcha_instance = new ReallySimpleCaptcha();
    $captcha_instance->bg = array( 244, 80, 80 );
    $word = $captcha_instance->generate_random_word();
    $prefix = mt_rand();
    $img_name = $captcha_instance->generate_image( $prefix, $word );
    $captcha_img = ETHEME_CODE_URL.'/inc/really-simple-captcha/tmp/'.$img_name;

    and the code in lines 476-480:

    <div class="captcha-block">
    <img src="<?php echo $captcha_img; ?>">
    <input type="text" name="captcha-word" class="captcha-input">
    <input type="hidden" name="captcha-prefix" value="<?php echo $prefix; ?>">
    </div>

    then edit the file theme-functions.php and comment the code $captcha_instance = new ReallySimpleCaptcha(); in line 1396 and this code in lines 1407-1412:

    if(!$captcha_instance->check( $_GET['captcha-prefix'], $_GET['captcha-word'] )) {
    $return['status'] = 'error';
    $return['msg'] = __('The security code you entered did not match. Please try again.', ETHEME_DOMAIN);
    echo json_encode($return);
    die();
    }

    and the code $captcha_instance->remove( $_GET['captcha-prefix'] ); in line 1463.

    To edit error message you can find it in the same file theme-functions.php in line 1409.

    Regards,
    Eva Kemp.

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.