Title: Age Validation Per Product for WooCommerce
Author: asynadak
Published: <strong>2025-02-07</strong>
Last modified: 2025-03-14

---

Szukaj wtyczek

![](https://ps.w.org/age-validation-per-product-for-woocommerce/assets/banner-772x250.
jpg?rev=3236580)

Wtyczka **nie została przetestowana z trzema ostatnimi głównymi wydaniami WordPressa**.
Może nie być już utrzymywana lub obsługiwana, co może skutkować problemem ze zgodnością
z nowszymi wersjami WordPressa.

![](https://ps.w.org/age-validation-per-product-for-woocommerce/assets/icon-256x256.
jpg?rev=3236580)

# Age Validation Per Product for WooCommerce

 Autor: [asynadak](https://profiles.wordpress.org/asynadak/)

[Pobierz](https://downloads.wordpress.org/plugin/age-validation-per-product-for-woocommerce.1.3.1.zip)

 * [Szczegóły](https://pl.wordpress.org/plugins/age-validation-per-product-for-woocommerce/#description)
 * [Recenzje](https://pl.wordpress.org/plugins/age-validation-per-product-for-woocommerce/#reviews)
 *  [Instalacja](https://pl.wordpress.org/plugins/age-validation-per-product-for-woocommerce/#installation)
 * [Rozwój](https://pl.wordpress.org/plugins/age-validation-per-product-for-woocommerce/#developers)

 [Wsparcie](https://wordpress.org/support/plugin/age-validation-per-product-for-woocommerce/)

## Opis

**WooCommerce Age Validation Per Product** gives you fine-grained control over who
can purchase restricted items in your WooCommerce store based on date-of-birth (
DOB) settings. Shop owners can:
 * Set a minimum or maximum DOB on simple products.*
Globally define DOB restrictions for variable products, or set them per variation.*
Prompt users for DOB at checkout only if restricted items are in the cart. * Block
checkout if the entered DOB does not satisfy the product(s) restrictions.

**Key Features:**
 * Per-product or per-variation DOB range (e.g., only allow customers
with birthdates in 01-01-1980 to 31-12-2005). * Global fields for variable products
that override each variation’s settings. * Conditional DOB field at checkout (shown
only if restricted items are in the cart). * Client-side datepicker in the admin(
so store managers can pick min/max dates) and in the checkout for users. * Automatic
validation to block purchase if the DOB is outside the allowed range. * Optionally
show notices on the product page or in the cart for restricted items.

**Use Cases:**
 * Alcohol, tobacco, vaping, or adult content requiring age gating.*
Specialty products requiring a specific DOB range (e.g., child tickets vs. adult
tickets). * Special subscription products that require age segmentation (i.e. summer
camps for children of different ages). * Any scenario needing a user’s date-of-birth
for compliance.

### Usage

 1. Activate the plugin.
 2. For **Simple Products**:
 3.  * Go to the “General” tab in “Product Data,” fill in **DOB Minimum** or **DOB 
       Maximum** in `dd-mm-yyyy` format.
 4. For **Variable Products**:
 5.  * In the “General” tab, fill in **Global DOB Minimum** or **Global DOB Maximum**.
     * (Optionally) Edit each variation to set specific DOB fields if the global fields
       are empty or need overriding.
 6. Optionally adjust **JavaScript** to handle date format or display if your store
    uses different date formats.

If you have any questions, see the “FAQ” section or contact us at https://socialmind.
gr/contact.

## Zrzuty ekranu

[⌊Simple Product – Min/Max DOB fields in the product’s General tab.⌉⌊Simple Product–
Min/Max DOB fields in the product’s General tab.⌉[

**Simple Product** – Min/Max DOB fields in the product’s General tab.

[⌊Variable Product – Global DOB fields.⌉⌊Variable Product – Global DOB fields.⌉[

**Variable Product** – Global DOB fields.

[⌊Variable Product – Per-variation overrides.⌉⌊Variable Product – Per-variation 
overrides.⌉[

**Variable Product** – Per-variation overrides.

[⌊Checkout DOB Field – Shown only when restricted products are in the cart.⌉⌊Checkout
DOB Field – Shown only when restricted products are in the cart.⌉[

**Checkout DOB Field** – Shown only when restricted products are in the cart.

## Instalacja

 1. **Upload** the entire `age-validation-per-product-for-woo` folder to the `/wp-content/
    plugins/` directory, or install via the WordPress Plugin Repository (if applicable).
 2. **Activate** the plugin from your WordPress “Plugins” page.
 3. **Ensure** WooCommerce is installed and active.
 4. Place the **`jquery-ui.css`** file in `assets/css/jquery-ui.css` within the plugin
    folder. This is used for the datepicker styling.
 5. Go to any WooCommerce product and configure the DOB fields in the “Product Data”
    panel:
 6.  * **Simple products**: In the “General” tab, look for “DOB Minimum” and “DOB Maximum.”
     * **Variable products**: In the “General” tab, set “Global DOB Minimum / Maximum.”
       If you need variation-specific overrides, edit each variation’s own fields.
 7. Optionally, instruct your users (or admin) to set their DOB in the **“My Account
    Account Details”** page or in the WP admin profile if needed.

## Najczęściej zadawane pytania

### 1) Why is the DOB field not appearing on checkout?

 * If there are no restricted products in the cart, the DOB field will not appear(
   by design).
 * Ensure you have set a min or max date for at least one product or variation.
 * Check for theme or plugin conflicts that might remove or rename the `billing_date_of_birth`
   field.

### 2) How do I set an “18 years old minimum” instead of a date range?

 * Currently, the plugin relies on a date range. If you want a simple “minimum age,”
   set the “Minimum DOB” to a date that corresponds to being 18 (for today’s date).
   For example, if today is 2024, you can set the min DOB to `01-01-2006` to enforce
   an 18+ rule (adjust as needed over time). Or modify the code to compute from 
   a numeric “Min Age.”

### 3) Can I store or reuse the user’s DOB for future orders?

 * By default, the plugin checks DOB every time. If you want to store it in the 
   user profile, you can add custom code to copy `_billing_date_of_birth` to user
   meta. Make sure to comply with privacy laws.

### 4) Why do my variation fields always appear empty?

 * If the “Global” fields are set, variation fields are intentionally disabled and
   do not save their own data. If you want to override that, edit the logic to allow
   both global and variation-level data.

### 5) Can I display a notice on the product page or the cart if the item is restricted?

 * Yes. See the plugin’s helper or your theme’s hooks to display a short message
   like “This product is age-restricted” on single product pages and in the cart
   for any restricted item.

## Recenzje

Wtyczka nie ma jeszcze żadnej recenzji.

## Kontrybutorzy i deweloperzy

„Age Validation Per Product for WooCommerce” jest oprogramowaniem open source. Poniższe
osoby miały wkład w rozwój wtyczki.

Zaangażowani

 *   [ asynadak ](https://profiles.wordpress.org/asynadak/)
 *   [ socialmind ](https://profiles.wordpress.org/socialmind/)

Wtyczka „Age Validation Per Product for WooCommerce” została przetłumaczona na 2
języki. Podziękuj [tłumaczom](https://translate.wordpress.org/projects/wp-plugins/age-validation-per-product-for-woocommerce/contributors)
za ich wkład.

[Przetłumacz wtyczkę “Age Validation Per Product for WooCommerce” na swój język.](https://translate.wordpress.org/projects/wp-plugins/age-validation-per-product-for-woocommerce)

### Interesuje cię rozwój wtyczki?

[Przeglądaj kod](https://plugins.trac.wordpress.org/browser/age-validation-per-product-for-woocommerce/),
sprawdź [repozytorium SVN](https://plugins.svn.wordpress.org/age-validation-per-product-for-woocommerce/)
lub czytaj [dziennik rozwoju](https://plugins.trac.wordpress.org/log/age-validation-per-product-for-woocommerce/)
przez [RSS](https://plugins.trac.wordpress.org/log/age-validation-per-product-for-woocommerce/?limit=100&mode=stop_on_copy&format=rss).

## Rejestr zmian

#### 1.3

 * Added front-end user profile DOB editing in My Account  Account Details (with
   datepicker).
 * Forced checkout DOB to match the user’s profile if logged in, overriding stale
   session data.
 * Added datepickers in user profiles (admin) for easy input.
 * Minor styling improvement (padding) on front-end DOB fields.
 * Enhanced synchronization for variable products’ fields.
 * Real-time variation sync if global fields are filled.
 * Nonce checks and unslashing data for plugin checker compliance.

#### 1.0

 * Original release with per-product / per-variation DOB, notices, and server-side
   validation.

## Meta

 *  Wersja **1.3.1**
 *  Ostatnia aktualizacja **2 lata temu**
 *  Włączone instalacje **10+**
 *  Wersja WordPressa ** 5.0 lub nowszej **
 *  Testowano do **6.7.10**
 *  Wersja PHP ** 7.0 lub nowszej **
 *  Języki
 * [English (US)](https://wordpress.org/plugins/age-validation-per-product-for-woocommerce/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/age-validation-per-product-for-woocommerce/),
   i [Spanish (Spain)](https://es.wordpress.org/plugins/age-validation-per-product-for-woocommerce/).
 *  [Przetłumacz na swój język](https://translate.wordpress.org/projects/wp-plugins/age-validation-per-product-for-woocommerce)
 * Tagi
 * [Age Validation](https://pl.wordpress.org/plugins/tags/age-validation/)[date of birth](https://pl.wordpress.org/plugins/tags/date-of-birth/)
   [Product restriction](https://pl.wordpress.org/plugins/tags/product-restriction/)
   [user profile](https://pl.wordpress.org/plugins/tags/user-profile/)[woocommerce](https://pl.wordpress.org/plugins/tags/woocommerce/)
 *  [Widok zaawansowany](https://pl.wordpress.org/plugins/age-validation-per-product-for-woocommerce/advanced/)

## Oceny

Nie przesłano jeszcze żadnych recenzji.

[Twoja opinia](https://wordpress.org/support/plugin/age-validation-per-product-for-woocommerce/reviews/#new-post)

[Zobacz wszystkierecenzje.](https://wordpress.org/support/plugin/age-validation-per-product-for-woocommerce/reviews/)

## Zaangażowani

 *   [ asynadak ](https://profiles.wordpress.org/asynadak/)
 *   [ socialmind ](https://profiles.wordpress.org/socialmind/)

## Wsparcie

Masz coś do dodania? Potrzebujesz pomocy?

 [Zobacz forum wsparcia](https://wordpress.org/support/plugin/age-validation-per-product-for-woocommerce/)

## Złóż datek

Czy chcesz wesprzeć rozwój wtyczki?

 [ Wspomóż wtyczkę ](https://socialmind.gr)