mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
✨ Serve the installation path with the WooSettings
This change correctly populates the modified Redux reducer
This commit is contained in:
parent
f96d52a3f9
commit
afbc79c0c5
1 changed files with 8 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue