As mentioned all the previous solutions are not working correctly anymore. And comparing SKUs doesn’t work either when you have the same item with different variants multiple times in a row.
My workaround is this, keep in mind this will not work if you have items in your store that have the same item name as well as the same variant name, for whatever reason someone shoud do this…
{% assign final_price = nil %}
{% assign line_name = line_item.title %}
{% if line_item.variant_title != blank %}
{% assign line_name = line_name | append: " - " | append: line_item.variant_title %}
{% endif %}
{% for item in order.line_items %}
{% assign order_name = item.title %}
{% if order_name == line_name %}
{% assign final_price = item.final_price %}
{% endif %}
{% endfor %}
{% if final_price %}
{{ final_price | money }}
{% endif %}
It’s a hack and it’s not very nice, but it is probably the only solution until shopify provides the item price in the “line_items_in_shipment” variable.