Skip to content

Commit 3049f90

Browse files
authored
fix: add criteria association with language (shopware#1385)
1 parent 4f9443d commit 3049f90

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

guides/plugins/plugins/checkout/document/add-custom-document-type.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,11 @@ class ExampleDocumentRenderer extends AbstractDocumentRenderer
231231

232232
$template = self::DEFAULT_TEMPLATE;
233233

234-
$orders = $this->orderRepository->search(new Criteria($ids), $context)->getEntities();
234+
$criteria = new Criteria($ids);
235+
$criteria->addAssociation('language');
236+
$criteria->addAssociation('language.locale');
237+
238+
$orders = $this->orderRepository->search($criteria, $context)->getEntities();
235239
foreach ($orders as $order) {
236240
$orderId = $order->getId();
237241

0 commit comments

Comments
 (0)