GSGeneral Spirit
Log inStart free

Age gates for WooCommerce vs Shopify vs BigCommerce: a platform comparison

General Spirit team · Last updated October 26, 20266 min read

Summary

A side-by-side look at how alcohol brands add an age gate on WooCommerce, Shopify and BigCommerce, drawn from each vendor's own documentation: where scripts go, how apps and themes inject code, what checkout can add, and what to watch for on each platform.

If you sell beer, wine, spirits or any other alcohol online, your platform decides how an age gate gets onto your pages, where it loads, and what you can add at checkout. WooCommerce, Shopify and BigCommerce all support a JavaScript gate, but they get there in different ways.

This comparison draws only on each vendor's own documentation. It leaves out pricing and third-party apps. For step-by-step setup, see our guides to WooCommerce, Shopify and BigCommerce. To compare Shopify options, see the best age gate for a Shopify alcohol store.

The short version

WooCommerceShopifyBigCommerce
Site-wide scriptPlugin, or a child theme with wp_enqueue_script()theme.liquid layout, a snippet, or an app embed blockScript Manager or the Scripts API; Catalyst can also add scripts in code
Head or footerEither; the footer is chosen with in_footerApp embeds can target head or bodyHead or bottom of body
Checkout optionsExtra required checkout fields, including a date fieldValidation Function that can block checkoutScript Manager can target the checkout page
Country awarenessOptional geolocation, set up through MaxMindNot covered hereScripts are channel-aware
Risk on theme updatesLow with a child themeTheme code edits can be lost on updateScripts sit outside the theme

Shopify

Most Shopify themes render every page through a layout file. Shopify's layouts documentation describes theme.liquid as the default layout and a good place for content you want in the <head> element on every page type. Layouts usually include the content_for_header and content_for_layout objects.

Snippets are "reusable pieces of Liquid code", called with the render tag. They're invisible to merchants in the theme editor, so a gate can't be turned off there by accident. General Spirit installs on Shopify as a theme snippet.

Apps take a different route. In Shopify's theme app extensions docs, apps that add "floating or overlaid elements" use app embed blocks. Shopify injects these before the closing </head> or </body> tag. App embeds are off by default after install, so a merchant has to switch them on under Theme Settings > App embeds, or follow a deep link the app provides.

One caution: the Help Center warns that if theme code edits are incompatible with a theme update, "all your code changes are removed in the updated copy". Its advice is to edit code only when an app or the theme editor can't do the job, and to duplicate the theme first.

At checkout, Shopify offers the Cart and Checkout Validation Function API. It returns errors that "block a customer from proceeding through checkout". Shopify's own example is a validation that "confirms a customer's age meets the legal requirement to purchase a product in their cart." That's a developer feature, not a setting, so you'll need an app or custom function.

WooCommerce

WooCommerce runs on WordPress, so the usual way to add a gate is a plugin. WordPress describes plugins as "PHP scripts that extend the functionality of WordPress", and many are free in the Plugin Directory.

If you'd rather add a script yourself, WordPress's wp_enqueue_script() registers and loads it. Its in_footer argument chooses the footer instead of the head (the default is false), and strategy can be defer or async. A gate that should appear before the page is usable is usually loaded in the head.

To keep a custom script safe from theme updates, WooCommerce recommends a child theme, "a layer that you put on top of the parent theme". The child theme "will get priority over the plugins and parent theme", and WooCommerce advises a backup before you start.

At checkout, the WooCommerce additional checkout fields API for the checkout block supports select, text, checkbox and date fields. They can go in contact information, address or order information. A field can be required, and a required checkbox must be ticked before the order is placed. That allows a date-of-birth field or an age affirmation box at checkout. Registering fields takes code.

For country-aware behaviour, WooCommerce can geolocate visitors through MaxMind. You turn it on under WooCommerce > Settings > General > Default customer location, and it needs a MaxMind account and licence key. The "with page caching support" option adds a ?v= query string to URLs, which is worth knowing if you care about clean URLs for SEO.

BigCommerce

On BigCommerce, scripts usually go through Script Manager in the control panel. The Catalyst scripts guide says you set a location ("the <head> or the bottom of the <body>"), the pages the script applies to, inline code or a URL, and a consent category (Essential, Functional, Analytics or Targeting). Catalyst only loads scripts set to All Pages or Storefront Pages and ignores other options. On Catalyst you can also add scripts in code with the Next.js <Script> component. The guide notes that every additional script has a performance cost.

The Scripts API lets apps deploy scripts programmatically, and scripts are channel-aware. On Stencil themes, scripts go in {{head.scripts}} or {{footer.scripts}}. Locations include all pages, checkout and order confirmation. The limits are 10 API-created scripts per app and 50 control panel scripts per channel, and new or updated scripts take about 20 seconds to cache on BigCommerce-hosted storefronts. One catch: control panel users can change a script's consent category or delete any script, including ones an app created. If you categorise a gate as anything but Essential, a consent tool may hold it back.

How to choose

  • Already on a platform? Each one can run a gate on every page, so migrating just for the gate rarely makes sense.
  • Who maintains it? Shopify snippets and WooCommerce child themes suit teams that edit code. App embeds, WordPress plugins and Script Manager suit teams that don't.
  • Theme churn. On Shopify, keep the gate in a snippet or app embed, and re-check it after theme updates. On WooCommerce, use a child theme.
  • Checkout. If you also want an age step at checkout, Shopify's Validation Function and WooCommerce's checkout fields are both documented. Both need code.
  • Search and AI. Whatever you use, make sure search crawlers can read your pages, and avoid an intrusive interstitial on content pages. See age gates and SEO.

Where General Spirit fits

General Spirit is a JavaScript age gate with a machine-readable policy. It installs with a script tag, with no proxy or DNS changes, so it runs on WooCommerce, Shopify, BigCommerce or any platform that loads a script. On Shopify it installs as a theme snippet. It supports date-of-birth, yes/no and remembered methods, and legal ages for every country are built in. Search crawlers are always allowed, and AI agents can be allowed, asked to attest, or blocked. It doesn't check ID, so if a market needs ID at checkout or delivery, you'll need a separate step. Treat its settings as guidance, not a guarantee that you meet the law.

This article is general information, not legal advice. Check your obligations with counsel in each market you sell into.

FAQ

Which platform makes it easiest to add an alcohol age gate?

All three can load a JavaScript age gate on every page. Shopify uses the theme.liquid layout, snippets or app embed blocks. WooCommerce uses a plugin or a child theme that enqueues a script. BigCommerce uses Script Manager or the Scripts API, and Catalyst stores can also add scripts in code. The easiest route is the one your team already maintains.

Can I add an age check at checkout as well as a gate?

Shopify documents a Cart and Checkout Validation Function that can block checkout, and uses an age rule as its own example. WooCommerce's checkout block lets extensions add required fields, including a date field. In the BigCommerce docs we reviewed, Script Manager can target the checkout page.

Will a theme update remove my age gate?

It can. Shopify warns that theme code edits can be lost when a theme is updated. On WooCommerce, a child theme keeps your changes separate from the parent theme. On BigCommerce, scripts in Script Manager live outside the theme files.

Does General Spirit work on all three?

General Spirit installs with a script tag, with no proxy or DNS changes, so it can load anywhere a platform allows a script. On Shopify it installs as a theme snippet. It doesn't check ID.

Want people and agents covered on your site?Set up your gate
General Spirit team · Last updated October 26, 2026

Related

GSGeneral Spirit

Age gates for WooCommerce vs Shopify vs BigCommerce: a platform comparison

General Spirit team · Last updated October 26, 20266 min read

Summary

A side-by-side look at how alcohol brands add an age gate on WooCommerce, Shopify and BigCommerce, drawn from each vendor's own documentation: where scripts go, how apps and themes inject code, what checkout can add, and what to watch for on each platform.

On this page

If you sell beer, wine, spirits or any other alcohol online, your platform decides how an age gate gets onto your pages, where it loads, and what you can add at checkout. WooCommerce, Shopify and BigCommerce all support a JavaScript gate, but they get there in different ways.

This comparison draws only on each vendor's own documentation. It leaves out pricing and third-party apps. For step-by-step setup, see our guides to WooCommerce, Shopify and BigCommerce. To compare Shopify options, see the best age gate for a Shopify alcohol store.

The short version

WooCommerceShopifyBigCommerce
Site-wide scriptPlugin, or a child theme with wp_enqueue_script()theme.liquid layout, a snippet, or an app embed blockScript Manager or the Scripts API; Catalyst can also add scripts in code
Head or footerEither; the footer is chosen with in_footerApp embeds can target head or bodyHead or bottom of body
Checkout optionsExtra required checkout fields, including a date fieldValidation Function that can block checkoutScript Manager can target the checkout page
Country awarenessOptional geolocation, set up through MaxMindNot covered hereScripts are channel-aware
Risk on theme updatesLow with a child themeTheme code edits can be lost on updateScripts sit outside the theme
Scroll sideways to see the full table.

Shopify

Most Shopify themes render every page through a layout file. Shopify's layouts documentation describes theme.liquid as the default layout and a good place for content you want in the <head> element on every page type. Layouts usually include the content_for_header and content_for_layout objects.

Snippets are "reusable pieces of Liquid code", called with the render tag. They're invisible to merchants in the theme editor, so a gate can't be turned off there by accident. General Spirit installs on Shopify as a theme snippet.

Apps take a different route. In Shopify's theme app extensions docs, apps that add "floating or overlaid elements" use app embed blocks. Shopify injects these before the closing </head> or </body> tag. App embeds are off by default after install, so a merchant has to switch them on under Theme Settings > App embeds, or follow a deep link the app provides.

One caution: the Help Center warns that if theme code edits are incompatible with a theme update, "all your code changes are removed in the updated copy". Its advice is to edit code only when an app or the theme editor can't do the job, and to duplicate the theme first.

At checkout, Shopify offers the Cart and Checkout Validation Function API. It returns errors that "block a customer from proceeding through checkout". Shopify's own example is a validation that "confirms a customer's age meets the legal requirement to purchase a product in their cart." That's a developer feature, not a setting, so you'll need an app or custom function.

WooCommerce

WooCommerce runs on WordPress, so the usual way to add a gate is a plugin. WordPress describes plugins as "PHP scripts that extend the functionality of WordPress", and many are free in the Plugin Directory.

If you'd rather add a script yourself, WordPress's wp_enqueue_script() registers and loads it. Its in_footer argument chooses the footer instead of the head (the default is false), and strategy can be defer or async. A gate that should appear before the page is usable is usually loaded in the head.

To keep a custom script safe from theme updates, WooCommerce recommends a child theme, "a layer that you put on top of the parent theme". The child theme "will get priority over the plugins and parent theme", and WooCommerce advises a backup before you start.

At checkout, the WooCommerce additional checkout fields API for the checkout block supports select, text, checkbox and date fields. They can go in contact information, address or order information. A field can be required, and a required checkbox must be ticked before the order is placed. That allows a date-of-birth field or an age affirmation box at checkout. Registering fields takes code.

For country-aware behaviour, WooCommerce can geolocate visitors through MaxMind. You turn it on under WooCommerce > Settings > General > Default customer location, and it needs a MaxMind account and licence key. The "with page caching support" option adds a ?v= query string to URLs, which is worth knowing if you care about clean URLs for SEO.

BigCommerce

On BigCommerce, scripts usually go through Script Manager in the control panel. The Catalyst scripts guide says you set a location ("the <head> or the bottom of the <body>"), the pages the script applies to, inline code or a URL, and a consent category (Essential, Functional, Analytics or Targeting). Catalyst only loads scripts set to All Pages or Storefront Pages and ignores other options. On Catalyst you can also add scripts in code with the Next.js <Script> component. The guide notes that every additional script has a performance cost.

The Scripts API lets apps deploy scripts programmatically, and scripts are channel-aware. On Stencil themes, scripts go in {{head.scripts}} or {{footer.scripts}}. Locations include all pages, checkout and order confirmation. The limits are 10 API-created scripts per app and 50 control panel scripts per channel, and new or updated scripts take about 20 seconds to cache on BigCommerce-hosted storefronts. One catch: control panel users can change a script's consent category or delete any script, including ones an app created. If you categorise a gate as anything but Essential, a consent tool may hold it back.

How to choose

  • Already on a platform? Each one can run a gate on every page, so migrating just for the gate rarely makes sense.
  • Who maintains it? Shopify snippets and WooCommerce child themes suit teams that edit code. App embeds, WordPress plugins and Script Manager suit teams that don't.
  • Theme churn. On Shopify, keep the gate in a snippet or app embed, and re-check it after theme updates. On WooCommerce, use a child theme.
  • Checkout. If you also want an age step at checkout, Shopify's Validation Function and WooCommerce's checkout fields are both documented. Both need code.
  • Search and AI. Whatever you use, make sure search crawlers can read your pages, and avoid an intrusive interstitial on content pages. See age gates and SEO.

Where General Spirit fits

General Spirit is a JavaScript age gate with a machine-readable policy. It installs with a script tag, with no proxy or DNS changes, so it runs on WooCommerce, Shopify, BigCommerce or any platform that loads a script. On Shopify it installs as a theme snippet. It supports date-of-birth, yes/no and remembered methods, and legal ages for every country are built in. Search crawlers are always allowed, and AI agents can be allowed, asked to attest, or blocked. It doesn't check ID, so if a market needs ID at checkout or delivery, you'll need a separate step. Treat its settings as guidance, not a guarantee that you meet the law.

This article is general information, not legal advice. Check your obligations with counsel in each market you sell into.

FAQ

Which platform makes it easiest to add an alcohol age gate?

All three can load a JavaScript age gate on every page. Shopify uses the theme.liquid layout, snippets or app embed blocks. WooCommerce uses a plugin or a child theme that enqueues a script. BigCommerce uses Script Manager or the Scripts API, and Catalyst stores can also add scripts in code. The easiest route is the one your team already maintains.

Can I add an age check at checkout as well as a gate?

Shopify documents a Cart and Checkout Validation Function that can block checkout, and uses an age rule as its own example. WooCommerce's checkout block lets extensions add required fields, including a date field. In the BigCommerce docs we reviewed, Script Manager can target the checkout page.

Will a theme update remove my age gate?

It can. Shopify warns that theme code edits can be lost when a theme is updated. On WooCommerce, a child theme keeps your changes separate from the parent theme. On BigCommerce, scripts in Script Manager live outside the theme files.

Does General Spirit work on all three?

General Spirit installs with a script tag, with no proxy or DNS changes, so it can load anywhere a platform allows a script. On Shopify it installs as a theme snippet. It doesn't check ID.

Want people and agents covered on your site?Set up your gate
General Spirit team · Last updated October 26, 2026

Related

Shopify age gates for alcohol brandsAge gates for BigCommerce alcohol stores