From 1807fca4fa8509b5ff4e25d7bf0a3084e9b97a55 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 28 Apr 2020 19:38:57 +1200 Subject: [PATCH] dev/core#1724 Fix Changes to CiviContribute Component Settings not saved It seems that, depending on the order in which settings are loaded, this is not always populated. Moving it here addresses, although medium term we should address all references to it --- Civi/Core/SettingsBag.php | 1 + tests/phpunit/api/v3/ContributionTest.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Civi/Core/SettingsBag.php b/Civi/Core/SettingsBag.php index 28f3ef3686..ca79d86036 100644 --- a/Civi/Core/SettingsBag.php +++ b/Civi/Core/SettingsBag.php @@ -168,6 +168,7 @@ class SettingsBag { [$this->defaults, $this->values, $this->mandatory] ); } + $this->combined['contribution_invoice_settings'] = $this->getContributionSettings(); return $this->combined; } diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index b727d7cf61..e391f12e4a 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -258,6 +258,8 @@ class api_v3_ContributionTest extends CiviUnitTestCase { /** * Test the 'return' param works for all fields. + * + * @throws \CRM_Core_Exception */ public function testGetContributionReturnFunctionality() { $params = $this->_params; -- 2.25.1