diff --git a/app/code/Magento/Sales/Test/Fixture/Creditmemo.php b/app/code/Magento/Sales/Test/Fixture/Creditmemo.php index 86695b23e489c..8e74f1c8b628b 100644 --- a/app/code/Magento/Sales/Test/Fixture/Creditmemo.php +++ b/app/code/Magento/Sales/Test/Fixture/Creditmemo.php @@ -130,7 +130,7 @@ private function prepareCreditmemoItems(array $data): array } elseif ($itemToRefund instanceof ProductInterface) { $creditmemoItem['order_item_id'] = $orderItemIdsBySku[$itemToRefund->getSku()]; } else { - $creditmemoItem = array_intersect($itemToRefund, $creditmemoItem) + $creditmemoItem; + $creditmemoItem = array_intersect_key($itemToRefund, $creditmemoItem) + $creditmemoItem; if (isset($itemToRefund['sku'])) { $creditmemoItem['order_item_id'] = $orderItemIdsBySku[$itemToRefund['sku']]; } elseif (isset($itemToRefund['product_id'])) {