Skip to content

Instantly share code, notes, and snippets.

@sidharrell
Created July 14, 2014 20:33
Show Gist options
  • Save sidharrell/0cb3086e1b71c71b9c51 to your computer and use it in GitHub Desktop.
Save sidharrell/0cb3086e1b71c71b9c51 to your computer and use it in GitHub Desktop.
EE4 js to make payment option auto-clicked if only one payment option available
jQuery(document).ready(function() {
jQuery('#spco-go-to-step-payment_options-btn').click(function() {
if (jQuery('.reg-page-payment-option-dv').length == 1) {
setTimeout(function(){jQuery('.reg-page-payment-option-dv').click();}, 2000);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment