Created
October 30, 2015 16:52
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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