From 2066bb4968af112bc95c013b51bcd4dbf50fb8e8 Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Fri, 21 Mar 2025 14:23:47 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20:hammer:=20Refactor:=20Use=20onl?= =?UTF-8?q?y=20the=20`core-profiler`=20path,=20otherwise=20use=20the=20def?= =?UTF-8?q?ault=20BN=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ppcp-api-client/services.php | 1 - modules/ppcp-api-client/src/Helper/PartnerAttribution.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/ppcp-api-client/services.php b/modules/ppcp-api-client/services.php index b5d8fe1ad..3306e70b7 100644 --- a/modules/ppcp-api-client/services.php +++ b/modules/ppcp-api-client/services.php @@ -972,7 +972,6 @@ return array( 'api.bn-codes' => static function (): array { return array( 'core-profiler' => 'WooPPCP_Ecom_PS_CoreProfiler', - 'payment-settings' => 'WooPPCP_Ecom_PS_PaymentSettings', ); }, 'api.helper.partner-attribution' => static function ( ContainerInterface $container ) : PartnerAttribution { diff --git a/modules/ppcp-api-client/src/Helper/PartnerAttribution.php b/modules/ppcp-api-client/src/Helper/PartnerAttribution.php index 97b480aa9..b75d2f934 100644 --- a/modules/ppcp-api-client/src/Helper/PartnerAttribution.php +++ b/modules/ppcp-api-client/src/Helper/PartnerAttribution.php @@ -68,9 +68,9 @@ class PartnerAttribution { /** * Retrieves the persisted BN Code. * - * @return string The stored BN Code, or the empty string if no path is detected . + * @return string The stored BN Code, or the default value if no path is detected. */ public function get_bn_code(): string { - return get_option( $this->bn_code_option_name, '' ); + return get_option( $this->bn_code_option_name, PPCP_PAYPAL_BN_CODE ); } }