By bojanz on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x-2.x
Introduced in version:
8.x-2.8
Issue links:
Description:
Adjustments stored in $order_item->adjustments used to apply to the order item unit price, and were duplicated by quantity before being added to the order total.
To resolve a number of bugs around tax/promotion calculation and rounding, order item adjustments now apply to the order item total price.
Order items now have a uses_legacy_adjustments field, set to TRUE for old order items, to preserve old behavior for existing orders.
Backwards compatibility has been broken for any promotion offer or tax plugins which calculate order item adjustments. They will need to be updated to multiply the adjustment amount by quantity before rounding.
For example:
$adjustment_amount = $adjustment_amount->multiply($order_item->getQuantity());
$adjustment_amount = $this->rounder->round($adjustment_amount);
Impacts:
Site builders, administrators, editors
Module developers