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.
Below is the Code necessary to create a basic version (PayPal and Stripe):
- Create two HTML DIV tags to represent the two different checkout options (PayPal and Stripe), and add two radio buttons for your members to be able to choose between the two options.
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>
Here's a look at the original code and then what the replacement would look like: - Include the following 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, or use a plugin like the Scripts-n-Styles Plugin that allows you to add this script in without issue.<script type="text/javascript"> jQuery(document).ready(function() { jQuery('radio[name="paymentType"]').click(function() { if (jQuery(this).val() === 'stripe') { jQuery('#stripe-section').show('fast'); jQuery('#mm-billing-information-section').show('fast'); jQuery('#paypal-section').hide('fast'); } else if ($(this).val() === 'paypal') { jQuery('#paypal-section').show('fast'); jQuery('#stripe-section').hide('fast'); jQuery('#mm-billing-information-section').hide('fast'); } }); jQuery('#paypal-section').hide('fast'); }); </script>
Here is an example of what this can look like on your checkout page:
You can find this full example for copy/pasting into an HTML block in the downloadable file accompanying this article.