• Hi,

    I have installed the plugin with Woocommerce, just for the Checkout Page.
    The plugin works, and when the page is loading it apears, but it seems to disapear before the document is ready.
    I have disabled “Disable for known users” and I have tested with anonymous browser session.

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter phmazzoni

    (@phmazzoni)

    I have tried the following code:

    // Add [recaptcha] shortcode
    if ( class_exists('WP_reCaptcha') )
        add_shortcode( 'recaptcha' , array( WP_reCaptcha::instance() , 'recaptcha_html' ) );
     
     
    // Customizing checkout fields using actions and filters
    add_action( 'woocommerce_after_order_notes', 'my_custom_checkout_field' );
     
    function my_custom_checkout_field( $checkout ) {
            echo '<div id="my_captcha"><label>' . __('Captcha') . '</label>';
     
                echo do_shortcode('[recaptcha]');
     
            echo '</div>';
    }
     
    add_action('woocommerce_checkout_process', 'my_custom_checkout_field_process');
     
    // Valided error
    function my_custom_checkout_field_process() {
        // Check if set, if its not set add an error.
        if ( !WP_reCaptcha::instance()->recaptcha_check() )
            wc_add_notice( __( 'Please enter correct captcha.' ), 'error' );
    }

    With this it appeared, but it not validating the click and is raising a error:

    “Error: Invalid ReCAPTCHA client id: 0”

    Which version of the plugin do you have?

    Thread Starter phmazzoni

    (@phmazzoni)

    1.2.1

    Ok, cause the behavior you describe was showing in a different version.
    Do you have another plugin installed that has also a reCaptcha functionality? I have noticed sometimes some weird interactions when more than one plugin can do reCaptcha.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Woocommerce Checkout’ is closed to new replies.