From 83085da76cb699d7e53d358b841f2397f32b9a49 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 4 Dec 2023 12:18:18 +1300 Subject: [PATCH] Stop using & deprectate getSalesTaxTerm This function made sense we we have that non-standard way of saving the taxTerm setting but now it just hides what the one-liner is doing --- CRM/Financial/Form/SalesTaxTrait.php | 5 ++++- CRM/Price/Page/Option.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Financial/Form/SalesTaxTrait.php b/CRM/Financial/Form/SalesTaxTrait.php index 3ea4d0183c..01f0949e10 100644 --- a/CRM/Financial/Form/SalesTaxTrait.php +++ b/CRM/Financial/Form/SalesTaxTrait.php @@ -18,8 +18,11 @@ trait CRM_Financial_Form_SalesTaxTrait { /** * Assign the sales tax term to the template. + * + * @deprecated since 5.69 will be removed around 5.80 */ public function assignSalesTaxTermToTemplate() { + CRM_Core_Error::deprecatedFunctionWarning('assign the setting'); $this->assign('taxTerm', $this->getSalesTaxTerm()); } @@ -47,7 +50,7 @@ trait CRM_Financial_Form_SalesTaxTrait { */ public function assignSalesTaxMetadataToTemplate() { $this->assignSalesTaxRates(); - $this->assignSalesTaxTermToTemplate(); + $this->assign('taxTerm', $this->getSalesTaxTerm()); } /** diff --git a/CRM/Price/Page/Option.php b/CRM/Price/Page/Option.php index b07bf8ccb8..19d399edb0 100644 --- a/CRM/Price/Page/Option.php +++ b/CRM/Price/Page/Option.php @@ -189,7 +189,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { $this->assign('customOption', $customOption); $this->assign('sid', $this->_sid); $this->assign('isEvent', $isEvent); - $this->assignSalesTaxTermToTemplate(); + $this->assign('taxTerm', $this->getSalesTaxTerm()); } /** -- 2.25.1