Skip to content

Commit

Permalink
NTR: fix translation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Feb 28, 2024
1 parent 8317847 commit e29eff1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Service/PaymentMethodService.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Shopware\Core\Checkout\Payment\PaymentMethodEntity;
use Shopware\Core\Content\Media\MediaCollection;
use Shopware\Core\Content\Media\MediaService;
use Shopware\Core\Defaults;
use Shopware\Core\Framework\Context;
use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent;
use Shopware\Core\Framework\DataAbstractionLayer\Exception\InconsistentCriteriaIdsException;
Expand Down Expand Up @@ -176,6 +177,11 @@ public function addPaymentMethods(array $paymentMethods, Context $context): void
# so we need to provide those with the value of
# the existing method!!!
'name' => $existingPaymentMethod->getName(),
'translated'=>[
Defaults::LANGUAGE_SYSTEM=>[
'name' => $existingPaymentMethod->getName()
]
]
];

if ($this->versionCompare->gte('6.5.7.0')) {
Expand All @@ -193,6 +199,11 @@ public function addPaymentMethods(array $paymentMethods, Context $context): void
'description' => '',
'mediaId' => $mediaId,
'afterOrderEnabled' => true,
'translated'=>[
Defaults::LANGUAGE_SYSTEM=>[
'name' => $paymentMethod['description']
]
]
];
}

Expand Down

0 comments on commit e29eff1

Please sign in to comment.