cancel
Showing results for 
Search instead for 
Did you mean: 

Consistency among getProduct() method in quote/order/invoice items

0 Kudos

Consistency among getProduct() method in quote/order/invoice items

When working with products regarding store context, there is inconsistency among Quote, Order and Invoice and Shipment items regarding the getProduct() method.

 

The best implementation as of 2.1.7 is Magento\Quote\Model\Quote\Item\AbstractItem.php, where it supplies store id in the context of the quotation.

 

I suggest that the model of Order and Invoice should follow such practise when getting product from underlying items, since developer expects a certain level of API consistency.

 

I can make PRs if everyone agrees.