Closed

Description
Preconditions
M 2.3.3
Steps to reproduce
- The method
getPrice()
from/vendor/magento/module-sales/Model/Order/Item.php
/**
* Return price
*
* @return float|null
*/
public function getPrice()
{
return $this->getData(OrderItemInterface::PRICE);
}
Expected result
Clearly states it should return a float, or null.
Actual result
However, when creating a MOTO order, and you set a custom price for a product, when you call getPrice()
for the order items, the returned value will be a string, not a float.
We switched to getBasePrice()
(seemingly operates the same as getPrice()
....) as that should also return a float, or null. It worked fine locally, but had a report that on Magento Cloud, it would return a string.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.4-develop branch