Shows an age-confirmation notice before a visitor sees the site, and remembers the answer. For sites with adult listings that must show a notice.
Requirements
- ShopClass 6.1.0 or later
- PHP 8.0 or later
- The theme must call the
headerandfooterhooks. Without either, no notice shows.
Install
- Open Plugins → Browse (or upload the zip from the GitHub release).
- Install.
- Activate.
Set up
- Open Plugins → Manage plugins, then Settings next to Age Warning.
- Edit the fields:
| Field | Default |
|---|---|
| Notice text | "This site contains adult content. Confirm that you are of legal age…" |
| Confirm button | "I am of legal age" |
| Decline button | "Leave this site" |
| Send decliners to | https://www.google.com/ |
| Remember for (days) | 30 (1–365) |
- Save.
Only http:// and https:// addresses work for the decline link. Anything else falls back to the default.
How it works
- A full-screen notice covers the page until the visitor confirms.
- The answer is kept in a cookie for the number of days you set.
- A visitor who declines goes to your chosen address.
- The notice is in every page and hidden in the browser once confirmed, so it works with a page cache.
- With JavaScript off, the notice stays.
Notes / limits
- It is a notice, not access control. The page is still sent to the browser, and a visitor can clear the cookie or read the source.
- Derived from the Osclass "Age warning" plugin (1.0.2). See CHANGELOG.md.
Support
https://github.com/mindstellar/shopclass-plugins/issues
What's new in 2.0.1
Changed
- Tested up to ShopClass 6.4.
Found a problem with Age Warning? Open an issue on GitHub.

