From afbc79c0c5f60e2558eff30771819fb9c79e28a5 Mon Sep 17 00:00:00 2001 From: Philipp Stracker Date: Fri, 21 Mar 2025 18:01:08 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Serve=20the=20installation=20path?= =?UTF-8?q?=20with=20the=20WooSettings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change correctly populates the modified Redux reducer --- modules/ppcp-settings/src/Data/GeneralSettings.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/ppcp-settings/src/Data/GeneralSettings.php b/modules/ppcp-settings/src/Data/GeneralSettings.php index fd2067c62..372a4db2f 100644 --- a/modules/ppcp-settings/src/Data/GeneralSettings.php +++ b/modules/ppcp-settings/src/Data/GeneralSettings.php @@ -12,6 +12,7 @@ namespace WooCommerce\PayPalCommerce\Settings\Data; use RuntimeException; use WooCommerce\PayPalCommerce\Settings\DTO\MerchantConnectionDTO; use WooCommerce\PayPalCommerce\Settings\Enum\SellerTypeEnum; +use WooCommerce\PayPalCommerce\Settings\Enum\InstallationPathEnum; /** * Class GeneralSettings @@ -128,7 +129,11 @@ class GeneralSettings extends AbstractDataModel { * @return array */ public function get_woo_settings() : array { - return $this->woo_settings; + $settings = $this->woo_settings; + + $settings['installation_path'] = $this->get_installation_path(); + + return $settings; } /** @@ -273,11 +278,11 @@ class GeneralSettings extends AbstractDataModel { } /** - * Retrieves the installation path for the branded experience. + * Retrieves the installation path. Used for the branded experience. * * @return string */ public function get_installation_path() : string { - return $this->data['installation_path']; + return $this->data['installation_path'] ?? InstallationPathEnum::DIRECT; } }