Skip to main content

How to change Shopify ownership installation

NOTES​

Please before run it, make sure that user wants to update all shopify stores, and not only a specific one.

  • Find the old user that you want to unlink from shopify store (current owner)
  • Find the new user that you want to transfer the ownership
  • Update all site access with new owner
  • Update all app access with new owner
  • Update all shopify installs with new owner
old_owner = User.find_by_email("[email protected]")
new_owner = User.find_by_email("[email protected]")

SiteAccess.where(user_id: old_owner.id).update_all(user_id: new_owner.id)
AppAccess.where(user_id: old_owner.id).update_all(user_id: new_owner.id)
ShopifyInstall.where(user_id: old_owner.id).update_all(user_id: new_owner.id)