From 04b0b3b1b9c7524d65a44ae047ad15868871b170 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 22 Feb 2024 16:21:17 +0100 Subject: [PATCH] PIWOO-237 fix render one issuer --- .../PaymentFieldsStrategies/GiftcardFieldsStrategy.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/PaymentMethods/PaymentFieldsStrategies/GiftcardFieldsStrategy.php b/src/PaymentMethods/PaymentFieldsStrategies/GiftcardFieldsStrategy.php index f9c52f32..b3a46098 100644 --- a/src/PaymentMethods/PaymentFieldsStrategies/GiftcardFieldsStrategy.php +++ b/src/PaymentMethods/PaymentFieldsStrategies/GiftcardFieldsStrategy.php @@ -26,9 +26,13 @@ public function execute($gateway, $dataHelper) if (count($issuers) === 1) { $issuer = $issuers[0]; $issuerImageSvg = $this->checkSvgIssuers($issuers); - $issuerImageSvg && ($html .= ''); - $html .= $issuer->name; - echo esc_html(wpautop(wptexturize($html))); + if ($issuerImageSvg && isset($issuer->name)) { + $issuerImageSvg = esc_url($issuerImageSvg); + $issuerName = esc_html($issuer->name); + $html .= '' . $issuerName; + } + + echo wpautop(wptexturize($html)); return; }