WordPress.org

Ready to get started?Download WordPress

Forums

Captcha
[resolved] Can Captcha use on Woocommerce forms???? How??? (6 posts)

  1. wpinklady
    Member
    Posted 6 months ago #

    Hi, as the topic title: can Captcha plugin use on the latest Woocommerce login, registration, lost password...etc. forms??? How to do it??? Can you help??? Thank you very much.

    https://wordpress.org/plugins/captcha/

  2. bestwebsoft
    Member
    Plugin Author

    Posted 6 months ago #

    Hi,

    Captcha will only be displayed if you are using standard registration, login, comments form pages. In case of using custom forms and pages it will be necessary to make changes in them so that captcha could be displayed and work correctly.
    Please follow the instructions below.
    = I would like to add Captcha to custom form on my website. How can I do this? =
    1. Install the Captcha plugin and activate it.
    2. Open the file with the form (where you would like to add the captcha to).
    3. Find a place to insert the code for the captcha output.
    4. Insert the necessary lines:
    if( function_exists( 'cptch_display_captcha_custom' ) ) { echo ""<input type='hidden' name='cntctfrm_contact_action' value='true' />""; echo cptch_display_captcha_custom() } ;
    If the form is HTML you should insert the line with the PHP tags:
    <?php if( function_exists( 'cptch_display_captcha_custom' ) ) { echo ""<input type='hidden' name='cntctfrm_contact_action' value='true' />""; echo cptch_display_captcha_custom(); } ?>
    5. Then you should add the lines to the function of the entered data checking
    if( function_exists( 'cptch_check_custom_form' ) && cptch_check_custom_form() !== true ) echo ""Please complete the CAPTCHA.""
    or
    <?php if( function_exists( 'cptch_check_custom_form' ) && cptch_check_custom_form() !== true ) echo ""Please complete the CAPTCHA."" ?>
    You could add this line to the variable and display this variable in the required place instead of echo ""Please complete the CAPTCHA."". If there is a variable (responsible for the errors output) in the check function, this phrase can be added to this variable. If the function returns 'true', it means that you have entered captcha properly. In all other cases the function will return 'false'.

    Sincerely,
    BestWebSoft Support Team

  3. vevans2
    Member
    Posted 3 months ago #

    wpinklady -

    It's great you got this working. Can you tell me where you placed the code?

    I tried a few spots in the file / woocommerce / templates / myaccount / form-login.php

    No luck though.
    Desperate for a captcha - thank you!

    And thank you to BWS for the instructions!!

    Valerie

  4. wpinklady
    Member
    Posted 3 months ago #

    Hi, vevans2:

    Unfortunately, I am not sure if it will work or not, because I never tried and did not use any Captcha since then.

    Sorry, I wish I could help.

  5. vevans2
    Member
    Posted 3 months ago #

    Thank you for following-up, wpinlady

    Valerie

  6. wpinklady
    Member
    Posted 3 months ago #

    Hi, Valerie:

    I really wish I could help! Sorry about that.
    If I find other way, will let you know.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.