From fcfd561072a9159d9182db547207f71e22597b5e Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Mon, 8 Jan 2024 11:05:31 -0500 Subject: [PATCH] deprecated settings --- src/WebformCivicrmBase.php | 3 +-- src/WebformCivicrmPreProcess.php | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/WebformCivicrmBase.php b/src/WebformCivicrmBase.php index cc4059cc7..b7681fef9 100644 --- a/src/WebformCivicrmBase.php +++ b/src/WebformCivicrmBase.php @@ -59,8 +59,7 @@ function __get($name) { return $this->_payment_processor; case 'tax_rate': - $taxSettings = $this->utils->wf_crm_get_civi_setting('contribution_invoice_settings'); - if (is_array($taxSettings) && !empty($taxSettings['invoicing'])) { + if (\Civi::settings()->get('invoicing')) { $contribution_enabled = wf_crm_aval($this->data, 'contribution:1:contribution:1:enable_contribution'); if ($contribution_enabled) { // tax integration diff --git a/src/WebformCivicrmPreProcess.php b/src/WebformCivicrmPreProcess.php index 362d59753..e8299e918 100644 --- a/src/WebformCivicrmPreProcess.php +++ b/src/WebformCivicrmPreProcess.php @@ -660,10 +660,8 @@ private function displayLineItems() { if ($itemTaxRate !== NULL) { // Change the line item label to display the tax rate it contains - $taxSettings = $this->utils->wf_crm_get_civi_setting('contribution_invoice_settings'); - - if (($itemTaxRate !== 0) && ($taxSettings['tax_display_settings'] !== 'Do_not_show')) { - $item['label'] .= ' (' . t('includes @rate @tax', ['@rate' => (float) $itemTaxRate . '%', '@tax' => $taxSettings['tax_term']]) . ')'; + if (($itemTaxRate !== 0) && (\Civi::settings()->get('tax_display_settings') !== 'Do_not_show')) { + $item['label'] .= ' (' . t('includes @rate @tax', ['@rate' => (float) $itemTaxRate . '%', '@tax' => \Civi::settings()->get('tax_term')]) . ')'; } // Add calculation for financial type that contains tax