From fe7eb3b4411f6eab634471c5afbdc310be1f1071 Mon Sep 17 00:00:00 2001 From: srajafallah Date: Tue, 18 Nov 2025 00:13:25 +0100 Subject: [PATCH] Fix: Convert Phrase to string in AdapterPlugin::afterGetTitle() Fix TypeError where getPaymentTitle() was returning Magento\Framework\Phrase instead of string. The method now properly converts the Phrase object to a string using type casting to match the expected return type. Fixes: TypeError in Hyva\Theme\ViewModel\Sales\PaymentInfo::getPaymentTitle() --- Plugin/Method/AdapterPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin/Method/AdapterPlugin.php b/Plugin/Method/AdapterPlugin.php index a8264b0..2e1d7ba 100644 --- a/Plugin/Method/AdapterPlugin.php +++ b/Plugin/Method/AdapterPlugin.php @@ -34,6 +34,6 @@ public function afterGetTitle(Adapter $subject, $result) $label = __('Wire transfer'); } - return $label; + return (string)$label; } }