Created
November 16, 2020 08:25
-
-
Save giucu91/eb733130cf9f0d6e3a3009959df77288 to your computer and use it in GitHub Desktop.
Paypal validations
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
var options = { | |
buttons: ['edd-purchase-button'], | |
environment: 'production', | |
condition: function () { | |
var valid = true; | |
if ($('#edd-email').val() == '') { | |
valid = false; | |
} | |
$('#edd_purchase_form input.required').each(function() { | |
if($(this).val() == '') { | |
valid = false; | |
} | |
}); | |
if($('#edd_agree_to_terms').length) { | |
if (!$('#edd_agree_to_terms').is(':checked')) { | |
valid = false; | |
} | |
} | |
return valid; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment