From 5b55868d7158f6c025f117e70d0005d026cbe9c1 Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Fri, 16 Nov 2018 11:45:11 +0100 Subject: [PATCH] Make the extension work with CiviSEPA 1.4. --- CRM/Twingle/Form/Profile.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/CRM/Twingle/Form/Profile.php b/CRM/Twingle/Form/Profile.php index 785ccc2..e45378a 100644 --- a/CRM/Twingle/Form/Profile.php +++ b/CRM/Twingle/Form/Profile.php @@ -383,9 +383,20 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form { // enabled. if ( CRM_Twingle_Submission::civiSepaEnabled() - && CRM_Sepa_Logic_Settings::isSDD(array( - 'payment_instrument_id' => $payment_instrument['value'], - )) + && ( + ( + method_exists('CRM_Sepa_Logic_PaymentInstruments', 'isSDD') + && CRM_Sepa_Logic_PaymentInstruments::isSDD(array( + 'payment_instrument_id' => $payment_instrument['value'], + )) + ) + || ( + method_exists('CRM_Sepa_Logic_Settings', 'isSDD') + && CRM_Sepa_Logic_Settings::isSDD(array( + 'payment_instrument_id' => $payment_instrument['value'], + )) + ) + ) ) { if (!isset(self::$_paymentInstruments['sepa'])) { self::$_paymentInstruments['sepa'] = E::ts('CiviSEPA');