Skip to content

Instantly share code, notes, and snippets.

@svaustin66
Created December 5, 2021 23:03
Show Gist options
  • Save svaustin66/c1653082316ff9499dc491cf8b2a3c28 to your computer and use it in GitHub Desktop.
Save svaustin66/c1653082316ff9499dc491cf8b2a3c28 to your computer and use it in GitHub Desktop.
Requiring login across the entire Shopify store
<html lang="{{ shop.locale }}">
<head>
{% unless customer %}
{% if template contains 'customers' %}
{% assign send_to_login = false %}
{% else %}
{% assign send_to_login = true %}
{% endif %}
{% endunless %}
{% if send_to_login and request.path != "/challenge" %}
<meta content="0; url=/account/login" http-equiv="refresh" />
{% else %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment