Thank you for posting that.
After looking into this I am now certain that there is no issue with your code and that the problem is 100% caused by the new order printer app.
It seems to me that the new app is incapable of seeing tip line items. I made a test order with one physical item and a tip. When viewing the .json version of the order page both the physical item and the tip are listed as individual line items. However, when looping through line items in the order printer app, it will only ever complete 1 loop - Implying that it does not see the tip line item at all. This is why all the replies are saying it works for them when they change the line item title to search for - Because the order printer can actually see those items.
I’ve searched through a good amount of documentation and can not see any other way to access the tip information via the new order printer app. When viewing the .json version of my test order I can see there is a property called “total_tip_received” which does indicate the tip amount - But I do not believe it is possible to access this property via the order printer:
Sadly I do not think you will find a solution on these forums. I recommend sending a support email (https://help.shopify.com/en/support/support-type). I do not recommend the live chat as I and many others have had issues with poor support through that method.
I also encourage you or anyone else reading this that is frustrated with this new app to leave an honest review on the new order printer app’s store page. In 3 months they will sunset the legacy app and I worry that they will not fix issues such as this unless they are encouraged by an influx of negative reviews and support tickets.
