From ae14189c7ab29e3f787beac8ca09a8dac8dad356 Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Mon, 30 Jun 2025 17:47:58 +0400 Subject: [PATCH] Fix psalm --- modules/ppcp-wc-gateway/src/Settings/SettingsListener.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-wc-gateway/src/Settings/SettingsListener.php b/modules/ppcp-wc-gateway/src/Settings/SettingsListener.php index a446ee9e6..dde9ee7dc 100644 --- a/modules/ppcp-wc-gateway/src/Settings/SettingsListener.php +++ b/modules/ppcp-wc-gateway/src/Settings/SettingsListener.php @@ -151,7 +151,7 @@ class SettingsListener { */ private $partner_merchant_id_sandbox; - private $reference_transaction_status; + private ReferenceTransactionStatus $reference_transaction_status; /** * The logger. @@ -405,7 +405,9 @@ class SettingsListener { $this->settings->persist(); } - if ( $subscription_mode === 'vaulting_api' && $vault_enabled !== '1' && $reference_transaction_enabled === true ) { + $reference_transaction_enabled = $this->reference_transaction_status->reference_transaction_enabled(); + + if ( $subscription_mode === 'vaulting_api' && $vault_enabled !== '1' && $reference_transaction_enabled ) { $this->settings->set( 'vault_enabled', true ); $this->settings->persist(); }