You are here

public function OrderItem::isUnitPriceOverridden in Commerce Core 8.2

Gets whether the order item unit price is overridden.

Overridden unit prices are not updated when the order is refreshed.

Return value

bool TRUE if the unit price is overridden, FALSE otherwise.

Overrides OrderItemInterface::isUnitPriceOverridden

File

modules/order/src/Entity/OrderItem.php, line 141

Class

OrderItem
Defines the order item entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function isUnitPriceOverridden() {
  return (bool) $this
    ->get('overridden_unit_price')->value;
}