Skip to content

Instantly share code, notes, and snippets.

@greathmaster
Created October 30, 2015 16:52
Show Gist options
  • Save greathmaster/1295265e493409f8b9e6 to your computer and use it in GitHub Desktop.
Save greathmaster/1295265e493409f8b9e6 to your computer and use it in GitHub Desktop.
Pre select the PayPal Express payment option (vs credit card) when using PayPal Website Payments Pro
/*
* Pre select the PayPal Express payment option (vs credit card) when using PayPal Website Payments Pro
*/
function pre_select_paypal()
{?>
<script>
jQuery(document).ready(function(){jQuery("input[name=gateway][value='paypalexpress']").click();});
</script><?php
}
add_action("wp_footer", "pre_select_paypal", 50);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment