Deprecate setting handler for long-gone nested contribution_invoice_settings
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 27 Oct 2023 04:08:43 +0000 (17:08 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 27 Oct 2023 04:08:43 +0000 (17:08 +1300)
CRM/Contribute/BAO/Contribution.php
CRM/Price/BAO/LineItem.php

index a04da212f21ceed1deb6daea3579f61519e90578..16412b14fe8251a92050fc14bae62ccecd5a1392 100644 (file)
@@ -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;
   }
index 4a1a81c85abece7e84b98d4547dea455cfd51444..f302fe692786561d1c5cc2d564e859a7b4924792 100644 (file)
@@ -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');
   }
 
   /**