Skip to content

Commit

Permalink
NTR: add the default system language
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Mar 19, 2024
1 parent 70fe37e commit e715245
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 e715245

Please sign in to comment.