BACK TO DIRECTORY

ByticsLab Age Restrictions for WooCommerce

by L K Lalitesh

0.0
(0 ratings)

ByticsLab Age Restrictions for WooCommerce lets you mark individual products (alcohol, tobacco, adult content, age-restricted supplements, etc.) as age-restricted and configure exactly how age verification is presented to visitors.

Features

  • Mark any simple or variable product as age-restricted from the standard product edit screen — no new post type, no extra database tables.
  • Configurable minimum age (18, 21, or any custom value).
  • A responsive, accessible age-verification modal shown on restricted product pages before the content is visible, with a configurable title, message, minimum age, confirm button, and exit button.
  • Exit button can redirect to the homepage, a custom URL, or any WordPress page.
  • Visitor confirmation is remembered via a lightweight cookie for a configurable number of days (or just the current browser session), so the modal doesn’t repeat on every page view.
  • Optional age-restriction badge on shop/archive listing pages (e.g. “18+ Age Restricted”).
  • Optional warning message below the Add to Cart button on restricted product pages.
  • Optional warning notice on the Cart and Checkout pages when a restricted product is in the cart — works with both the classic Cart/Checkout pages and the block-based Cart/Checkout.
  • Configurable colors (badge, warning messages, modal accent) and text size, using the native WordPress color picker — no CSS editing required.
  • Translation-ready: every string is wrapped for translation, a .pot file is included, and translations are bundled for German, French, Spanish, Swedish, Danish, Norwegian, and Hindi.
  • Built with the WordPress Settings API, nonces on all form submissions, sanitized/escaped input and output throughout, and WooCommerce hooks only (no template overrides).
  • Cache-friendly: the modal is rendered identically for every visitor and toggled purely client-side, so it will not break full-page caching.

How it works

  1. Edit any product and check “Age-restricted product” in the Product Data General tab.
  2. Configure your minimum age, modal copy, and display options under WooCommerce Age Restriction.
  3. Visitors who open a restricted product page see the age-verification modal first. Confirming lets them view the page (remembered via cookie); exiting redirects them away.
  4. Optional badges and warning messages reinforce the restriction on listing pages, the product page, and cart/checkout.

Screenshots

Plugin listing page showing settings option

Plugin listing page showing settings option

Plugin settings page with age, modal options.

Plugin settings page with age, modal options.

Plugin settings page showing more settings for display, and appearance options.

Plugin settings page showing more settings for display, and appearance options.

Age-restricted product checkbox in the WooCommerce product editor.

Age-restricted product checkbox in the WooCommerce product editor.

Age-restriction badge displayed on a WooCommerce product listing.

Age-restriction badge displayed on a WooCommerce product listing.

Age-verification modal shown on a restricted product page.

Age-verification modal shown on a restricted product page.

Cart warning shown when the cart contains an age-restricted product.

Cart warning shown when the cart contains an age-restricted product.

Checkout warning shown when the cart contains an age-restricted product.

Checkout warning shown when the cart contains an age-restricted product.

Plugin Details

Active Installs
0
Total Downloads
103
Version
1.0.0
Requires WP
6.0
Requires PHP
7.4
Tested Up To
7.1
Added
2026-08-26
Last Updated
2026-08-26 5:04am GMT

Ratings

5
0
4
0
3
0
2
0
1
0