From: Eileen McNaughton Date: Fri, 27 Oct 2023 04:08:43 +0000 (+1300) Subject: Deprecate setting handler for long-gone nested contribution_invoice_settings X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=38b79582940e2771c54a50497e9754ad447940e3;p=civicrm-core.git Deprecate setting handler for long-gone nested contribution_invoice_settings --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index a04da212f2..16412b14fe 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4135,13 +4135,14 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac * settings we will live with an inconsistency because it's too hard to change for now. * https://github.com/civicrm/civicrm-core/pull/8562#issuecomment-227874245 * - * * @param string $name * * @return string * + * @deprecated since 5.68 will be removed around 5.74. */ public static function checkContributeSettings($name) { + CRM_Core_Error::deprecatedFunctionWarning('Use \Civi::settings()->get() with the actual setting name'); $contributeSettings = Civi::settings()->get('contribution_invoice_settings'); return $contributeSettings[$name] ?? NULL; } diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index 4a1a81c85a..f302fe6927 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -1256,7 +1256,7 @@ WHERE li.contribution_id = %1"; * @return string */ protected function getSalesTaxTerm() { - return CRM_Contribute_BAO_Contribution::checkContributeSettings('tax_term'); + return \Civi::settings()->get('tax_term'); } /**