I am trying to use a Wordpress module called WooCommerce PDF Invoices to make event tickets by modifying the layout of the invoice to create an online ticket to printout. I've successful reformatted the layout and it works like a charm except for one thing.

The problem I have is that no matter what is bought the invoice reads "This is a ticket" which I hardcoded into the invoice design. What I would like is an if/then statement inserted into the invoice design that will print between "This is a ticket" or "This is a receipt" depending on if they purchase one of the 4 ticket items. Is this possible? If so, can anyone give me a direction to find the coding for this?

If ticket 1 then print "This is a ticket"
else print "This is a receipt.
If ticket 2 then print "This is a ticket"
else print "This is a receipt.
If ticket 3 then print "This is a ticket"
else print "This is a receipt.
If ticket 4 then print "This is a ticket"
all else print "This is a receipt.

Can anybody give me an idea how to write this in php. I'm a pro at html but I've only taught myself how to modify existing php coding. I can't write it from scratch. Any help is appreciated.