Code for Hide "Edit Address" button for customers

I am not overlery firmiliar with code but I want to hide the ‘Edit Address’ button in my store’s theme code. This is to force customers to email us if they need a change made to their accounts. Has anyone a step-by-step guide on what code to input and where to input it to achieve this?

Thank you in advance

I used the Dawn Shopify Theme for reference

This also depends on your Account type setting.
You only can do that if you have “Legacy” customer accounts under Settings-> Customer Accounts:

Then these pages are controlled by your theme and you can either edit theme code or add “Custom CSS” to hide those buttons.

Say, add this code to the “Theme settings”-> “Custom CSS” in “Edit theme”:

.customer.addresses [id*="EditFormButton"] {
  display: none;
}

This will hide “edit” buttons, but leave “delete” buttons.
If you want to hide those as well, use this code:

.customer.addresses button {
  display: none;
}


if my post is helpful, please like it ♡ and mark as a solution -- this will help others find it

This Worked, thank you very much for your help!

1 Like