Professional DNI/NIF field for WooCommerce checkout with validation for Spain and Portugal
Features
- Professional validation for Spanish documents (DNI, NIE, CIF)
- Portuguese document support (NIF, NIPC)
- Real-time validation with AJAX
- Client-side validation for instant feedback
- WooCommerce integration - seamless checkout experience
- Theme compatibility - works with all major themes
- Responsive design - mobile-friendly
- Accessibility - WCAG compliant
- Auto-updates via GitHub
- WordPress standards compliant
Installation
IMPORTANT: Download from Releases, not the "Code" button.
Method 1: WordPress Admin (Recommended)
- Go to GitHub Releases
- Download the latest
dniwoo-vX.X.X.zipfile - In WordPress: Plugins > Add New > Upload Plugin
- Upload the ZIP file and activate
Method 2: Manual Installation
- Download from Releases
- Extract the ZIP file
- Upload the
dniwoofolder to/wp-content/plugins/ - Activate in WordPress admin
⚠️ Do NOT download from "Code" button
This creates folder naming issues. Always use the Releases section.
Requirements
- WordPress 5.0 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher
Configuration
Navigate to WooCommerce > Settings > DNIWOO to configure:
- Enable/Disable the DNI field
- Required field - make DNI mandatory
- Validation mode - real-time or on submit
- Error messages - customize validation messages
- Field position - choose where to display the field
- Country detection - automatic field type switching
Supported Documents
Spain
- DNI (Documento Nacional de Identidad) - 8 digits + letter
- NIE (Número de Identidad de Extranjero) - X/Y/Z + 7 digits + letter
- CIF (Código de Identificación Fiscal) - Letter + 7 digits + control
Portugal
- NIF (Número de Identificação Fiscal) - 9 digits
- NIPC (Número de Identificação de Pessoa Coletiva) - 9 digits
Field Validation
Client-side (JavaScript)
- Format validation while typing
- Real-time AJAX validation (optional)
- Immediate user feedback
- Prevents form submission with invalid data
Server-side (PHP)
- Complete validation algorithms
- Double-check on form submission
- Security against tampering
Theme Compatibility
DNIWOO is designed to work with all WordPress themes:
- Astra
- Storefront
- GeneratePress
- OceanWP
- Divi
- Avada
- And many more
Styling
The plugin includes comprehensive CSS that adapts to your theme:
- Responsive design for all devices
- Dark mode support
- High contrast mode support
- RTL (right-to-left) language support
- Print-friendly styles