This is not an official feature in MemberMouse. Therefore it is up to you or your developer to implement this properly and the MemberMouse Customer Success Team cannot provide any support.


If you are accepting both PayPal and credit cards on your checkout, you may be interested in allowing your members to toggle between the two. This way, if a member selects the PayPal radio button, the credit card fields will be hidden from the checkout. And vice versa. 



Code necessary to create a basic version (PayPal and Stripe):


  •  Create two radio buttons:
    Note - The following code needs to be placed within a <div> tag with the class="mm-checkoutInfoBlock" inside of the Checkout Page. An example of what this should look like, is presented below before the code:

    <div class="mm-checkoutInfoBlock">
    ...CODE MENTIONED BELOW...
    </div>


    <input style="vertical-align:top;" id="directBillingButton" checked="checked" name="paymentType" type="radio" value="stripe"> <label style="display:inline;" for="directBillingButton">Credit Card</label>

    <input style="vertical-align:top;" id="offsiteBillingButton" name="paymentType" type="radio" value="paypal"> <label style="display:inline;width:auto;" for="offsiteBillingButton">PayPal</label>

  • Add some HTML DIVs with IDs to show or hide. For example:
    Note - The following code needs to replace the code where the payment button would normally be in the Checkout Page.

    <div id="stripe-section">
    Any content relevant to making a purchase with a credit card <br/>
    <a href="[MM_Form_Button type='submit' paymentMethod='default']"
    class="mm-button blue large rounded">Sign Up</a></div>

    <div id="paypal-section">
    Any content relevant to making a purchase with PayPal <br/>
    <a href="[MM_Form_Button type='submit' paymentMethod='paypal']"
    class="mm-button blue large rounded">Sign Up With PayPal</a>
    </div>


    Example:



  • Include this script in your WordPress content at the top:
    Note - Due to how WordPress handles the <script> tag, you will either need to work with a developer to Disable WordPress filtering of script tags, or use a plugin such as Scripts n Styles to enable scripts in order for the following code to work on your site.   

    <script>
    jQuery(document).ready(function() {
    jQuery('.mm-checkoutInfoBlock input:radio').click(function() {
       if (jQuery(this).val() === 'stripe') {
          jQuery('#stripe-section').show('fast');
          jQuery('#paypal-section').hide('fast');
       } else if ($(this).val() === 'paypal') {
          jQuery('#stripe-section').hide('fast');
          jQuery('#paypal-section').show('fast');
       }
     });

    jQuery('#paypal-section').hide('fast');
    });
    </script>