• I would like to add some custom verification to the checkout process. I would like to restrict a member level based on the province entered during checkout. I would appreciate some help in determining the best way to handle this.

    I have found instructions on using the ws_plugin__s2member_during_configure_user_registration action, but I need to prevent the registration from proceeding so I don’t think this is the solution for me.

    https://wordpress.org/plugins/s2member/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Please give a bit more info: What if a member is not in the province it supposed to be for this level? Goes to another level? Or blocked (not registered)?

    Thread Starter Bev

    (@bstofko)

    The registration should be blocked if in error.

    I have found a close example that I am working on adapting, unless someone has a better way.

    http://www.s2member.com/forums/topic/hidden-fields-and-validation-in-pro-forms/

    OK, I would attach a function to this hook, to check if member is allowed to register. If none, will do wp_redirect(home_url())…
    I am curious to see your solution, if possible…

    Thread Starter Bev

    (@bstofko)

    I ended up just using a jQuery check since my form is not rendered if jQuery is disabled anyway.

    // Registration validation
    $('#s2member-pro-authnet-checkout-submit').click(function() {
    	if ( $('#s2member-pro-authnet-checkout-state').val().toLowerCase().indexOf("ontario") >= 0 ) {
    		alert ('Province error');
    		return false;
    	}
    });

    Thanks! That’s better solution than mine – logical and understandable for the user.

    Thanks; that could be useful….

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding custom verification to the checkout’ is closed to new replies.