Tuesday’s Tip: Selectively hide the PayPal button on your Infusionsoft order forms

In some situations you may want to hide the PayPal button for a specific order form or shopping cart. Perhaps you are running an A/B test to find out if the PayPal button affects conversions, or maybe your PayPal account has limitations do to your geographic location.

Whatever reason you have, hiding the PayPal button is incredibly easy and can be accomplished with just a few lines of JavaScript.

If you want to hide the button on an order form, add the below code to the Custom Header section on the HTML Areas tab of the order form settings page.

Shopping carts are a little different. You’ll need to create a theme to use for orders that shouldn’t have the PayPal button. Add the below code to the Custom Header section on the HTML Areas tab of the theme’s settings page.

<script type="text/javascript">// <![CDATA[
jQuery(document).ready(function() {
	jQuery("#checkoutWithPayPalLink").hide();
	jQuery("#payPalType").parent().hide();
});
// ]]></script>

That is it! The PayPal button will be hidden as soon as the page loads.

Keep in mind that Infusionsoft frequently updates the shopping cart and order form code. If this isn’t working for you, it may be time to update.

Leave a Reply