public function OrderItemInterface::getAdjustedUnitPrice in Commerce Core 8.2
Gets the adjusted order item unit price.
Calculated by dividing the adjusted total price by quantity.
Useful for refunds and other purposes where there's a need to know how much a single unit contributed to the order total.
Parameters
string[] $adjustment_types: The adjustment types to include in the adjusted price. Examples: fee, promotion, tax. Defaults to all adjustment types.
Return value
\Drupal\commerce_price\Price|null The adjusted order item unit price, or NULL.
1 method overrides OrderItemInterface::getAdjustedUnitPrice()
- OrderItem::getAdjustedUnitPrice in modules/
order/ src/ Entity/ OrderItem.php - Gets the adjusted order item unit price.
File
- modules/
order/ src/ Entity/ OrderItemInterface.php, line 170
Class
- OrderItemInterface
- Defines the interface for order items.
Namespace
Drupal\commerce_order\EntityCode
public function getAdjustedUnitPrice(array $adjustment_types = []);