Notice fix on payment block
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 18 Nov 2023 04:17:09 +0000 (17:17 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 18 Nov 2023 04:17:09 +0000 (17:17 +1300)
We don't need to check if we are dealing with a multiple participant event because that
is the only scenario where the field additional_participants is present
& it will fail gracefully if it is not present. This has been causing notices across
all flows that include the payment block

templates/CRM/common/paymentBlock.tpl

index 7844e4a7e50f34892366a56fee7cb219a4a2261d..8a3c00436b80dfd05acf66fb87abcda358c9f827 100644 (file)
@@ -52,8 +52,7 @@
    */
   function skipPaymentMethod() {
     var isHide = false;
-    var isMultiple = {/literal}{$event.is_multiple_registrations|@json_encode}{literal};
-    var alwaysShowFlag = (isMultiple && cj("#additional_participants").val());
+    var alwaysShowFlag = (cj("#additional_participants").val());
     var alwaysHideFlag = (cj("#bypass_payment").val() == 1);
     var total_amount_tmp =  cj('#pricevalue').data('raw-total');
     // Hide billing questions if this is free