replace deprecated calls with buildOptions
authoragbud8@zabuntu <jon@megaphonetech.com>
Wed, 10 Feb 2021 21:55:46 +0000 (16:55 -0500)
committeragbud8@zabuntu <jon@megaphonetech.com>
Wed, 10 Feb 2021 21:55:46 +0000 (16:55 -0500)
CRM/Contribute/Form/Contribution.php

index 955249973e1fa5db52aee1a37f8fb32f12bfdb86..d843075338ac1ecf53dc67ac95b2d80643ef2bda 100644 (file)
@@ -627,10 +627,10 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     if (!$this->_mode) {
       // payment_instrument isn't required in edit and will not be present when payment block is enabled.
       $required = !$this->_id;
-      $checkPaymentID = array_search('Check', CRM_Contribute_PseudoConstant::paymentInstrument('name'));
+      $checkPaymentID = array_search('Check', CRM_Contribute_BAO_Contribution::buildOptions('payment_instrument_id', 'validate'));
       $paymentInstrument = $this->add('select', 'payment_instrument_id',
         ts('Payment Method'),
-        ['' => ts('- select -')] + CRM_Contribute_PseudoConstant::paymentInstrument(),
+        ['' => ts('- select -')] + CRM_Contribute_BAO_Contribution::buildOptions('payment_instrument_id', 'create'),
         $required, ['onChange' => "return showHideByValue('payment_instrument_id','{$checkPaymentID}','checkNumber','table-row','select',false);"]
       );
     }