Hide bundle items from customer’s account Order History Page

Note that if you have Add bundle items as separate line items to orders? app setting disabled, then this help article is not applicable to you.

By default, the dummy bundle product and its bundle items are individually displayed on the customer account’s Order History Page.
Merchants may choose to hide the bundle items from this page for operational purposes.

From your Shopify admin, go to Sales channels > Online Store.
Under Themes, click on Actions > Edit code.
notion image
Search for the theme file whose name contains keywords such as “order” or “customer”, which may contain the liquid code to your customer account’s order history page.
For example, for the ‘Dawn’ Shopify theme, the theme file name is called main-order.liquid.
notion image
In the theme file, search for the below (similar) snippet:
<tbody role="rowgroup"> {%- for line_item in order.line_items -%} <tr role="row">
And replace with:
<tbody role="rowgroup"> {%- for line_item in order.line_items -%} <!-- BUNDLE KIT --> {% assign line_item_is_a_bundle_item = false %} {% if line_item.line_level_discount_allocations %} {% for discount_allocation in line_item.line_level_discount_allocations %} {% if discount_allocation.discount_application.title contains 'Bundle Kit:' %} {% assign line_item_is_a_bundle_item = true %} {% endif %} {% endfor %} {% endif %} {% if line_item_is_a_bundle_item == true %} {% continue %} {% endif %} <!-- BUNDLE KIT --> <tr role="row">
Then click Save.
Once saved, bundle items shall be hidden from the customer account's Order History Page.