Minimum Age for WooCommerce

描述

Add a checkout question for the customer’s date of birth, and enforce a minimum age. The customer cannot checkout if their given date of birth means they are younger than the minimum age.

Requirements

  • WooCommerce 3.0 or greater
  • PHP 5.6 or greater

Translations

If you’d like to help out by translating this plugin, please sign up for an account and dig in.

Contributions

Privacy

The customer’s date of birth is recorded, so that transactions can be audited for compliance with minimum age legislation. The customer’s date of birth is transmitted in order confirmation and notification emails. This information is not shared with any other parties.

螢幕截圖

  • WooCommerce settings
  • The birth date question in the checkout, showing an error message

常見問題

How can I set the minimum age?

The default minimum age is 18. You can change it the WooCommerce settings:

WooCommerce > Settings > Minimum Age > Minimum age

How can I change the order of the date fields?

The default order of the birth date fields is day, month, year. You can choose a different layout in the settings:

WooCommerce > Settings > Minimum Age > Date layout

Can I show the date of birth question conditionally?

There is a filter hook minimum_age_woo_show_question that allows developers to hide the date of birth question if it isn’t required, e.g. only show for products in certain categories. It accepts a single boolean parameter, and returns a boolean: true to show the question, otherwise false.

評價

2021年6月25日
Staring July 1 2021 for online shops in The Netherlands when selling alcohol age verification is mandatory. This is exactly what I needed, simple and effective. Thank you for providing!
2021年4月15日
Great plugin, it is light and it works as expected. But there is an urgent need to have the customer form and the errors translated to various languages. I updated the file “class.Checkout.php” but this is something I have to do every time there is an update. Please use po/mo files instead!
2019年1月18日
Thank you for providing a nice plugin. It works.
閱讀全部4個評價

貢獻者及開發者

“Minimum Age for WooCommerce” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

Minimum Age for WooCommerce 外掛目前已有 7 個本地化語言版本。 感謝所有譯者為這個外掛做出的貢獻。

將 Minimum Age for WooCommerce 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

The full changelog can be found on GitHub. Recent entries:

1.1.0

Released 2023-10-31

  • fixed: support for WooCommerce HPOS (high performance order storage)
  • added: filter hook minimum_age_woo_show_question allowing hookers to conditionally suppress the age question
  • changed: marked as tested up to WooCommerce 8.2