Ah, now it’s much clearer what’s happening. The issue here is why SKUs show in the email preview but not in actual test orders this usually happens because line.sku isn’t accessible in the customer-facing email context the same way it is in staff notifications.
Here’s a breakdown in simple terms:
Why it’s not showing
Staff vs. Customer emails
Staff order notifications have access to the full line object, including line.sku.
Customer-facing emails sometimes use a simplified line item object (line_title, line_display) and may not include line.sku by default.
Variables used in your snippet
You’re using line_title and line_display for the title and quantity — this is typical for customer emails.
line.sku may not exist in this context, so the {% if line.sku != blank %} block never runs in the actual order email.
How to fix
You have two main options:
Use the variant.sku via line.variant.sku
In customer emails, line.variant.sku is usually available even if line.sku isn’t. Replace your snippet with:
{% if line.variant.sku != blank %}
<span class="order-list__item-sku" style="font-size:14px; color:#999;">
SKU: {{ line.variant.sku }}
</span><br/>
{% endif %}
Place it right below your product title block:
<span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>
{% if line.variant.sku != blank %}
<span class="order-list__item-sku" style="font-size:14px; color:#999;">
SKU: {{ line.variant.sku }}
</span><br/>
{% endif %}
{% if line.variant.title != 'Default Title' and is_parent == false %}
<span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
{% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
<span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
{% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
<span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
{% endif %}
This usually fixes the problem and SKUs show in actual customer emails.
Optional: Add fallback for bundles
If you’re using bundles or nested products, you may also want to check child_line.variant.sku inside your bundle loop:
{% for child_line in line.bundle_components %}
{% if child_line.variant.sku != blank %}
<span style="font-size:14px; color:#999;">
SKU: {{ child_line.variant.sku }}
</span><br/>
{% endif %}
{% endfor %}
If you want, I can rewrite your full order email snippet so it supports SKUs for all products, including bundles and variants, ready to paste into Dawn’s customer order email template.