When a customer selects an order in his order history he is redirected to the order information page.
If the items have not yet been shipped there is only one tab available: Items ordered. If its shipped and invoiced two other tabs are available: Shipment and Invoice.
Where can I find the code responsible for showing and not showing the aforementioned tabs? I am asking because I want to create a custom tab and dynamically decide whether it should be shown or not.