How can I hide my invoice link in the shipping notification from customers from a certain country?

My customers get a link to download their invoices with their shipping notification, so there is a download link in the liquid template of the notification.

For customers from Switzerland I don’t want to show the download link, as they get their invoice from a company that handles shipping and customs for the import.

I thought it could be done by a query in the liquid to get the country from the billing address, but I don’t get the correct syntax.

Something like:

{% if billing.address.country_code != “CH” %}

(download link)

{% endif}

Would this work? Or how can I ask the query only for the country of the billing address?

Thanks for your help!

Thank you James.
To be honest I am a complete newbie to liquid coding. How can I find out the correct variable name my Shopify store uses for the billing address country code?

Best regards,
Holger

Hey @EmergeR ! I believe you’re close on this, but try billing_address.country_code instead (per Shopify’s Liquid docs: https://shopify.dev/docs/api/liquid/objects/order)