You are here

public function OrderItem::usesLegacyAdjustments in Commerce Core 8.2

Gets whether the order item uses legacy adjustments.

Indicates that the adjustments were calculated based on the unit price, which was the default logic prior to Commerce 2.8, changed in #2980713.

Return value

bool TRUE if the order item uses legacy adjustments, FALSE otherwise.

Overrides OrderItemInterface::usesLegacyAdjustments

2 calls to OrderItem::usesLegacyAdjustments()
OrderItem::getAdjustedTotalPrice in modules/order/src/Entity/OrderItem.php
Gets the adjusted order item total price.
OrderItem::getAdjustedUnitPrice in modules/order/src/Entity/OrderItem.php
Gets the adjusted order item unit price.

File

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

Class

OrderItem
Defines the order item entity class.

Namespace

Drupal\commerce_order\Entity

Code

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