Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/amirrezashf/woocommerce-personal-name-validator/archive/refs/heads/main.zipValidate WooCommerce billing first and last names during checkout. The plugin is site-independent and contains no hardcoded domain, brand, product, or store-specific behavior.
Features
- Prevents identical billing first and last names
- Rejects configurable organization, business, institution, and title terms
- Supports WooCommerce Classic Checkout
- Supports WooCommerce Checkout Block / Store API
- Normalizes common Persian/Arabic Unicode variants before comparison
- Removes invisible Unicode formatting characters before validation
- Collapses duplicate whitespace
- Case-insensitive matching where
mbstringis available - Customizable term list through a WordPress filter
- Customizable error messages
- No settings page, custom table, or persistent plugin data
Requirements
- WordPress 6.0+
- PHP 7.4+
- WooCommerce
mbstring is recommended but not required.
Installation
- Upload
WooCommerce-Personal-Name-Validatorto/wp-content/plugins/. - Activate WooCommerce Personal Name Validator.
- Test checkout with valid and invalid billing names.
Classic Checkout
Classic Checkout validation uses woocommerce_after_checkout_validation and adds errors to WooCommerce's normal WP_Error collection.
Checkout Block
Checkout Block / Store API validation uses woocommerce_store_api_checkout_update_order_meta. WooCommerce allows extensions to stop Checkout Block from proceeding by throwing an exception from this hook.
Name Normalization
Before comparison, the plugin sanitizes fields, normalizes common Arabic/Persian character variants, removes zero-width/direction formatting characters, collapses whitespace, and lowercases text where possible.
Customize Disallowed Terms
add_filter( 'wcpnv_disallowed_terms', function ( $terms ) {
$terms[] = 'عنوان جدید';
$terms = array_diff( $terms, array( 'مهندس' ) );
return $terms;
} );
Customize Messages
add_filter( 'wcpnv_same_name_message', function () {
return 'Please enter a different first and last name.';
} );
add_filter( 'wcpnv_disallowed_term_message', function () {
return 'Please enter a personal name rather than an organization or title.';
} );
Important Limitation
This is a heuristic input-quality validator, not identity verification. Substring matching is intentional, so store owners should review the disallowed-term list for their locale and customer base.
License
GPL-3.0
Author
Amirreza Shayesteh Far
https://github.com/amirrezashf
اعتبارسنج نام و نام خانوادگی ووکامرس
این افزونه نام و نام خانوادگی صورتحساب مشتری را هنگام Checkout بررسی میکند و هیچ وابستگی به سایت یا برند خاصی ندارد.
قابلیتها
- جلوگیری از یکسان بودن کامل نام و نام خانوادگی
- جلوگیری از استفاده از مجموعهای قابلتغییر از عناوین سازمانی، تجاری و شغلی
- پشتیبانی از Classic Checkout و Checkout Block
- نرمالسازی حروف رایج فارسی و عربی
- حذف کاراکترهای نامرئی Unicode
- نرمالسازی فاصلههای اضافی
- بدون صفحه تنظیمات و بدون ذخیره داده اختصاصی
محدودیت
این افزونه صرفاً برای بهبود کیفیت ورودی است و احراز هویت محسوب نمیشود.
مجوز
GPL-3.0