Hi All,
I have extension attributes for sales order and items in custom tables. storing the values after placing an order and also using a plugin OrderRepository's afterGet() method.
In database tables all values are saving properly.
But when I view the order in admin, the order item extension values are not showing up.
Plugin code:
$orderItems = $order->getItems();
foreach ($orderItems as $orderItem) {
...
$orderItemExtension = $extensionAttributes ? $extensionAttributes : $this->orderItemExtensionFactory->create();
$srpSalesOrderItem = $this->srpSalesOrderItemRepository->get($orderItem->getItemId());
$orderItemExtension->setSrpSalesOrderItem($srpSalesOrderItem);
$orderItem->setExtensionAttributes($orderItemExtension);
....
return $order
Please let me know what is the issue here.