6 thoughts on “Add google recaptcha to memberpress login page”

  1. Hi there! Which registration page? You may refer to
    /wp-content/plugins/memberpress/app/views/checkout/form.php
    open it and again just immediately after where:
    <div class="mepr_spacer"> </div>
    add
    <div class="sgr-recaptcha"></div>
    isn’t it?

  2. Should I changed this part for the memberpress registration forms i just want to have the recaptch on the memberpress registration page? –
    if( isset($_REQUEST[‘mepr_process_login_form’]) && isset($_REQUEST[‘mepr_is_login_page’]) ){
    sgr_verify($_REQUEST);
    }

    Thank you.

  3. This has been used into a site where the registration flow is done in several pages one after other, where users need to fill forms to register, then if needed (and only if needed, may after a test period) finally pay for a subscription.
    Since the code added was firing also on second step, the payment page, we want to avoid that the recaptcha presents again after first step.
    So the code above, to display the recaptcha only when user fill and submit (is on) the registration form (page), and not if on payment screen for example.
    Yes should work. If not, it is only necessary to change vars to check against and avoid to fire the recaptcha on specified pages/forms.

  4. On a simple free registration with no checkout, this code works for me:

    In simple-google-recaptcha.php:

    function sgr_check() {
    //* Modify for MemberPress registration
    if( isset($_REQUEST['mepr_process_signup_form']) ){
    sgr_verify($_REQUEST);
    }

    In the MemberPress checkout form:

    < ! -- Add recaptcha -->

    I’m not sure what will happen in a site where I’m charging for membership. When I get that far I’ll try to report back.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.