Requirements
↑ Back to topBefore installing the Phone Number Validation extension, ensure that your environment meets the following requirements:
- WordPress: Version 6.0 or higher
- WooCommerce: Version 7.0 or higher
- PHP: Version 7.4 or higher
- HTTPS: Recommended for secure data transmission
Setup and Installation
↑ Back to topFollow these steps to install and activate the Phone Number Validation plugin on your WooCommerce store:
- Download the Plugin:
- Download the plugin zip file from the official WooCommerce marketplace after purchase.
- Upload to WordPress:
- Log in to your WordPress admin dashboard.
- Navigate to
Plugins
>Add New
. - Click on the
Upload Plugin
button. - Choose the plugin
.zip
file you downloaded and clickInstall Now
.
- Activate the Plugin:
- After installation, click the
Activate Plugin
button. - The plugin is now active and ready for configuration.
- After installation, click the
- Configure Plugin Settings:
- Click on
Settings
to access the plugin’s settings panel; OR - Navigate to
WooCommerce
>Settings
>Shipping
>Phone Validation
to access the plugin’s settings panel.
- Click on
Usage
↑ Back to topPlugin Settings Overview

The Phone Number Validation plugin provides a comprehensive settings panel within the WooCommerce Shipping settings. Here’s an overview of the available settings:
- Add Shipping Phone Field: Add a shipping phone number input field to the shipping form.
- Make Shipping Phone Required: Require customers to enter a shipping phone number. If disabled, the field will be optional.
- Initial Country: The initial country code displayed for customers without an account.
- Default:
US
- Default:
- Supported Countries: Select the country codes that are allowed. Leave blank to allow all countries. Must include the initial country when set.
- Default: All countries allowed.
- Preferred Countries: Countries that appear at the top of the dropdown list during checkout.
- Default:
US
,GB
- Default:
- Show Country Codes: Display country codes and flags on the checkout phone field. De-selecting this checkbox only shows country flags.
- Allow Dropdown: Allow users to select their country from a dropdown menu.
- Exclude Countries: Select countries to exclude from the country dropdown.
- Enable Debug: Enable debug logging for phone number validation. Debub logs found at
WooCommerce
>Status
>Logs
Classic Checkout

For stores using the classic WooCommerce checkout system, the Phone Number Validation plugin integrates seamlessly to enhance phone number fields. Here’s how it works:
- Enhanced Phone Fields:
- The billing phone field is augmented with country flags and validation mechanisms.
- If enabled, a separate shipping phone field is added to the shipping address form.
- Real-Time Validation:
- As customers enter their phone numbers, the plugin validates the input in real time, ensuring correctness.
- Error Notifications:
- If a phone number is invalid, an error message is displayed, and the customer is prompted to correct it before proceeding.
- Order Processing:
- Validated phone numbers are saved to the order metadata, ensuring accurate customer information.
Block Checkout

For stores utilizing WooCommerce’s block-based checkout system, the Phone Number Validation plugin ensures compatibility and enhanced functionality:
- Integration with WooCommerce Blocks:
- The plugin detects block-based checkout pages and initializes phone number validation accordingly.
- Error Messaging:
- Each phone number field will show a dedicated notice on the exact nature of the error. Examples include:
- Billing phone number has an invalid country code.
- Billing phone number is too short.
- Billing phone number is too long.
- Billing phone is an invalid number.
- If validation fails and the customer attempts to proceed, a checkout error message is displayed at the top of the checkout form.
- Disabling “Place Order” Button:
- The “Place Order” button is disabled until all phone numbers are correctly validated, preventing incomplete or incorrect orders.