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 within the <div> tag has the class="mm-checkoutInfoBlock" inside of the Checkout Page. This is purely for looks and can be changed as desired:

    <div class="mm-checkoutInfoBlock">
    .<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>

    </div>



  • 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 need to copy/paste the following code into an HTML block at the top of your page above all other content.   

    <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>


You can find this full example for copy/pasting into an HTML block in the following file: