diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js index 4e018b51e2dfd694e4f86c9c616a8b4e57048671..1967192d9b256f113a107124d94095dae6d1db93 100644 --- a/js/civicrm_stripe.js +++ b/js/civicrm_stripe.js @@ -480,9 +480,20 @@ CRM.$(function($) { } function getIsRecur() { + // Auto-renew contributions if (document.getElementById('is_recur') !== null) { + if (document.getElementById('is_recur').type == 'hidden') { + return document.getElementById('is_recur').value == 1; + } return Boolean(document.getElementById('is_recur').checked); } + // Auto-renew memberships + if (document.getElementById('auto_renew') !== null) { + if (document.getElementById('auto_renew').type == 'hidden') { + return document.getElementById('auto_renew').value == 1; + } + return Boolean(document.getElementById('auto_renew').checked); + } return false; }