d
Topic
seagullnz Member
Posts:
2
Last edited 5 months ago

if shipping_address != billing_address This post is outdated

Hi, I'm trying to print the shipping address on the bottom of my invoices only if the shipping address is different to the billing address, which is always printed at the top. The following liquid code does not giving me results I would expect. Is this code valid or can someone please give me the correct code for the logic I'm trying to achieve?

{% if shipping_address != billing_address  %}

 

i
Replies
seagullnz Member
Posts:
2
5 months ago

I've seen some of the default templates use 

{% if shipping_address.address1 != billing_address.address1  %}

So I guess this answers my question but it's not perfect as there are some rare situations where this will not produce results as expected.