Last Updated on by Dan S
Originally Published April 22, 2021.
Depending on the products you’re selling in your Shopify store, you might want or need to add a disclaimer at checkout. By implementing this measure, you’ll know they’ve read and agreed to the disclaimer/terms before checking out. Important Update (2025): checkout.liquid, additional scripts, and script tags are deprecated for the Thank you and Order status pages and will be sunset on August 28, 2025. Checkout Extensibility makes it easier for Shopify Plus merchants to customize their checkout in a way that’s app-based, upgrade-safe, higher-converting, and integrated with Shop Pay. Shopify is investing in Checkout Extensibility as the sole way to customize Shopify Checkout moving forward. Standard Shopify plans remain limited to cart page modifications.
Does Shopify allow you to add a disclaimer at checkout, or do you need a specific app for this? By default, there is no inbuilt method by Shopify. There are GDPR and California Privacy Act checkboxes for the checkout but nothing custom for other needs such as ensuring the customer is over 18 for example. Some themes have this option. If not, we can add one so let’s have a look.
Add A Disclaimer Checkbox On Shopify
- Go to your Shopify admin page and click on Online Store.
- Select Themes and choose the theme you want to edit.
- Click on Actions and select Edit Code.
- Go to Assets and click on theme.js. In some cases, it might be theme.js.liquid.
- Go to the bottom of this file and paste the following vanilla JavaScript code:
document.addEventListener('DOMContentLoaded', function () {
const checkoutButtons = document.querySelectorAll('[name="checkout"], [name="goto_pp"], [name="goto_gc"]');
checkoutButtons.forEach(function(btn) {
btn.addEventListener('click', function(e) {
const agreeCheckbox = document.getElementById('agree');
if (agreeCheckbox && !agreeCheckbox.checked) {
e.preventDefault();
alert("You must agree with the terms and conditions of sales to check out.");
}
});
});
});- Click Save.
- Select Sections.
- Click on cart-template.liquid. If you don’t have this file in your Shopify admin, look for cart.liquid or main-cart-items.liquid (depending on your theme version).
- Look for the HTML code. You should see one of the two elements: <input> or <button>.
- The code here should look like this:
<button type="submit" name="checkout" class="btn">{{ 'cart.general.checkout' | t }}</button>- Paste this code on a new line over the checkout button.
<p style="float: none; text-align: right; clear: both; margin: 10px 0;">
<input style="float:none; vertical-align: middle;" type="checkbox" id="agree" aria-labelledby="termsLabel" />
<label style="display:inline; float:none" for="agree">
<span id="termsLabel">
I agree with the <a href="/pages/terms-and-conditions">terms and conditions</a>.
</span>
</label>
</p>- Instead of the /pages/terms-and-conditions part of the code above, paste the URL of the Terms and Conditions page of your store.
If you don’t have a Terms and Conditions page, make one. Click Save.
For Dawn 15.0+ Themes: If you’re using Shopify’s default Dawn theme or another Online Store 2.0 theme, and checkout occurs via the cart drawer (or AJAX cart), validation must be integrated using Shopify’s updated cart.js API. You’ll need to modify main-cart-items.liquid and ensure you disable dynamic checkout buttons for consistent behavior.
Accessibility Note
To ensure your checkbox meets WCAG 2.1 standards, use semantic HTML and proper ARIA tags. For example, include aria-labelledby="termsLabel"on your checkbox and connect it to a clear <span id="termsLabel"> with accessible language outlining what the user is agreeing to.
GDPR & CCPA Consideration
Depending on your jurisdiction, you may be legally required to gain explicit user consent before processing their personal data. Adding a terms checkbox is a good practice for GDPR, CCPA, and CPRA compliance—especially when collecting sensitive information or selling to California or EU customers.
Important Note on Dynamic Checkout Buttons
If you’re adding validation to the cart page, be aware that “Buy Now” or dynamic checkout buttons (e.g., Apple Pay, Google Pay) may bypass this validation. Disable them by going to Theme Settings > Product Pages and toggling off “Show dynamic checkout button.”
Shopify Plus Merchants: Critical Update for 2025
Important: checkout.liquid is now unsupported for the Information, Shipping, and Payment checkout steps. August 28, 2025 was the deadline to replace your existing Thank you and Order status pages with the new version of those pages. If you haven’t upgraded by this date, then your Thank you and Order status pages are impacted by some limitations. January 2026: Automatic upgrades begin, and all customizations using additional scripts, apps with script tags, or checkout.liquid on the Thank you and Order status pages will be lost.
Checkout Extensibility makes it easier for Shopify Plus merchants to customize their checkout in a way that’s app-based, upgrade-safe, higher-converting, and integrated with Shop Pay. Checkout Extensibility is a suite of powerful platform features that make it easier to customize your checkout in a way that’s app-based, upgrade-safe, performant, and seamlessly integrated with Shop Pay. With Checkout Extensibility, you can make no-code customizations using apps and branding tools, or use our collection of components and APIs to build more bespoke checkout experiences.
For Shopify Plus merchants who need to add disclaimer checkboxes or custom validations at checkout, you now have two primary options:
- Use Checkout Extensions: Build or install apps that use Shopify’s Checkout UI Extensions to add custom fields, checkboxes, and validation logic directly in the checkout flow.
- App-Based Solutions: Install apps from the Shopify App Store such as “RA Term and Condition Checkbox” or “Warnify Pro Warnings” that are built with Checkout Extensibility compatibility.
For merchants using non-sectioned themes or needing more in-depth examples, follow Shopify’s updated developer documentation on checkout functionality and disclaimers available here: Shopify Checkout UI Extensions Documentation.
To check if your store needs to upgrade, visit Settings > Checkout in your Shopify admin and look for the upgrade notification. You can still manually upgrade your Thank you and Order status pages after August 28, 2025. Plus stores without customizations will be periodically upgraded automatically. All other Plus stores will receive a 30-day notice before being automatically upgraded in January 2026.







