By default, Relocate's Update Address button appears in your order confirmation email for any order that is still editable. A short Liquid edit will hide it for orders shipping to countries you specify.

Use GB, not UK. Shopify stores countries as ISO 3166-1 alpha-2 codes, where the United Kingdom is GB. There is no UK code, and Liquid raises no error for one, so a condition written against UK silently does nothing.

Before you start

Copy the current template into a text file. Shopify keeps no edit history for notification templates, so this is your only way back to your customised version.

1. Open the template

In your Shopify admin, go to Settings > Notifications > Customer notifications, open Order confirmation, then click Edit code.

2. Add the excluded country list

Paste this near the top of the template, above the HTML markup and alongside any other {% assign %} statements. It must sit above the Update Address button or the check will not work.

{% comment %} Relocate: countries where address editing is not offered {% endcomment %}
{% assign relocate_blocked_countries = 'GB' | split: ',' %}
{% assign relocate_address_editing_allowed = true %}
{% if relocate_blocked_countries contains shipping_address.country_code %}
  {% assign relocate_address_editing_allowed = false %}
{% endif %}

3. Update the button's condition

In the Customer information section, find the line directly above the Update Address button:

{% if shop.metafields.crwdctrlreloc.enabled == 1 %}

Replace it with:

{% if shop.metafields.crwdctrlreloc.enabled == 1 and relocate_address_editing_allowed %}

Leave everything else unchanged, including the button's link. Save the template.

4. Test with a real order

Place a test order shipping to an excluded country and confirm the button is gone, then one shipping elsewhere and confirm it still appears. Check both, because a mistake in this edit usually hides the button for everyone rather than for no one.

Preview will not show the change. Shopify's preview and test send use a fixed sample address, so they render the same result whatever you put in the country list.

Notes

  • Excluding several countries. Add codes to the same string with no spaces: 'GB,IE,FR'.
  • Jersey, Guernsey and the Isle of Man are JE, GG and IM, not GB. Add them if your reason for excluding the UK applies to them.
  • Gating on the billing country instead. Use billing_address.country_code if the restriction is for tax rather than delivery.
  • This hides a button, not the feature. A customer holding a link from an earlier email, or opening the editor from their account, can still reach address editing.
  • Button gone for every country? The block from step 2 is below the button in the template, or the variable name is misspelled in one of the two places it appears. Liquid treats an unknown variable as false.
  • Reverting the notification to default removes this edit along with every other customisation, including Relocate's own.