Skip to content

Commit

Permalink
NTR: add the default system language (#726)
Browse files Browse the repository at this point in the history
Co-authored-by: Vitalij Mik <vitalij.mik@dasistweb.de>
  • Loading branch information
BlackScorp and Vitalij Mik authored Mar 19, 2024
1 parent 77be51e commit 1903129
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Service/PaymentMethodService.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,12 @@ public function addPaymentMethods(array $paymentMethods, Context $context): void
$translations = $existingPaymentMethod->getTranslations();

if ($translations !== null) {
$paymentMethodData['translations'][Defaults::LANGUAGE_SYSTEM] = [
'name' => $existingPaymentMethod->getName()
];

foreach ($translations as $translation) {
$paymentMethodData['translations'][$translation->getLanguageId()]=[
$paymentMethodData['translations'][$translation->getLanguageId()] = [
'name' => $translation->getName()
];
}
Expand Down

0 comments on commit 1903129

Please sign in to comment.