diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js index 3d06db27318b5089aad46be099a547700093ae92..79b5d2e991c194176ebaa7dbe9ac7cc825c0c20a 100644 --- a/js/civicrm_stripe.js +++ b/js/civicrm_stripe.js @@ -180,7 +180,10 @@ $totalElement = $('#wf-crm-billing-total'); if ($totalElement.length) { - if ($totalElement.data('data-amount') === '0') { + // Handle old and new jQuery conventions (https://api.jquery.com/data/#data-html5) + // The second form is the new form as of jQuery 1.4.3 (jQuery tries to convert string + // numbers to integers). + if ($totalElement.data('data-amount') === '0' || $totalElement.data('amount') === 0 ) { debugging('webform total is 0'); return true; }