Title: Phone Validator with Flags for WooCommerce
Author: Mokhtar Bensaid
Published: <strong>2025 年 7 月 12 日</strong>
Last modified: 2026 年 5 月 25 日

---

搜索插件

![](https://ps.w.org/phone-validator-with-flags-for-woocommerce/assets/banner-772x250.
jpg?rev=3545396)

![](https://ps.w.org/phone-validator-with-flags-for-woocommerce/assets/icon-256x256.
png?rev=3545396)

# Phone Validator with Flags for WooCommerce

 作者：[Mokhtar Bensaid](https://profiles.wordpress.org/mokhtarbsaid/)

[下载](https://downloads.wordpress.org/plugin/phone-validator-with-flags-for-woocommerce.2.0.0.zip)

 * [详情](https://cn.wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/#description)
 * [评价](https://cn.wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/#developers)

 [支持](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/)

## 描述

**Phone Validator with Flags for WooCommerce** enhances the billing phone field 
on the checkout page by:

 * Displaying a dropdown with country flags and dial codes.
 * Auto-detecting the default country based on your WooCommerce store location.
 * Validating the phone number format before order submission.
 * Respecting WooCommerce’s “Selling Locations” settings to limit the list of countries.
 * Supporting both Classic Checkout and Block Checkout (introduced in WooCommerce
   8+).
 * Allowing full customization via a dedicated settings page under WooCommerce  
   Settings  Phone Validator.
 * Supporting the shipping phone field independently from the billing phone field.

Ideal for WooCommerce stores targeting international customers who want to ensure
clean, valid phone numbers during checkout.

Have a question or need help? [Contact the developer](https://mokhtarbensaid.com/contact/).

### Features

 * Add country flags and dial codes to the checkout phone field.
 * Validate phone numbers in real-time before submission.
 * Full support for WooCommerce Block Checkout (Gutenberg).
 * Supports billing phone, shipping phone, and My Account phone fields independently.
 * Set preferred countries to appear at the top of the dropdown with a visual divider.
 * Choose between all countries or only WooCommerce Selling Locations.
 * Shipping phone field uses WooCommerce Shipping Locations automatically.
 * Inline error messages styled to match WooCommerce notices.
 * Respects WooCommerce field validation rules automatically.
 * Compatible with WordPress 7 and WooCommerce 10+.
 * GDPR-safe – no external APIs, fully self-hosted.
 * Compatible with High-Performance Order Storage (HPOS).
 * Lightweight and translation-ready.

### Libraries Used

This plugin includes the following third-party open source library:

 * [intl-tel-input](https://github.com/jackocnr/intl-tel-input) v29.0.1 – JavaScript
   international phone input utility.
    Source: https://github.com/jackocnr/intl-
   tel-input License: MIT

## 屏幕截图

[⌊Enhanced checkout phone field with country flag and dial code.⌉⌊Enhanced checkout
phone field with country flag and dial code.⌉[

Enhanced checkout phone field with country flag and dial code.

[⌊Enhanced Account addresses phone field with country flag and dial code.⌉⌊Enhanced
Account addresses phone field with country flag and dial code.⌉[

Enhanced Account addresses phone field with country flag and dial code.

[⌊Plugin settings page part 1 under WooCommerce → Settings → Phone Validator .⌉⌊
Plugin settings page part 1 under WooCommerce → Settings → Phone Validator .⌉[

Plugin settings page part 1 under WooCommerce  Settings  Phone Validator .

[⌊Plugin settings page part 2 under WooCommerce → Settings → Phone Validator.⌉⌊Plugin
settings page part 2 under WooCommerce → Settings → Phone Validator.⌉[

Plugin settings page part 2 under WooCommerce  Settings  Phone Validator.

## 安装

 1. Upload the plugin folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Ensure that WooCommerce is active and “Selling Locations” are configured.
 4. Go to WooCommerce  Settings  Phone Validator to configure the plugin.
 5. The billing phone field on the checkout page will now display with country flag
    and validation.

## 常见问题

### Does this plugin send data to third-party services?

No. All assets and logic are fully self-hosted. No external scripts, APIs, or CDNs
are used.

### Does this plugin work with WooCommerce Block Checkout?

Yes. Since version 2.0.0 the plugin fully supports Block Checkout introduced in 
WooCommerce 8+.

### Does this plugin work with custom phone fields?

Currently it targets the default WooCommerce billing_phone, shipping_phone, and 
My Account phone fields.

### What if the user enters an invalid phone number?

An inline error message will appear styled to match WooCommerce notices, and the
order will not be submitted until a valid number is entered.

### Does it support HPOS?

Yes. This plugin officially declares compatibility with WooCommerce High-Performance
Order Storage.

### Can I set a default country?

Yes. You can set a default country from WooCommerce  Settings  Phone Validator. 
The default behavior uses your WooCommerce store country automatically.

### Can I show preferred countries at the top of the list?

Yes. You can select preferred countries from the settings page and they will appear
at the top of the dropdown, separated from the rest by a visual divider.

### Does it support the shipping phone field?

Yes. You can enable the shipping phone field independently from WooCommerce  Settings
Phone Validator. The shipping phone dropdown will only show countries from your 
WooCommerce Shipping Locations.

### Is it compatible with WordPress 7 and the latest WooCommerce?

Yes. The plugin is fully tested and compatible with WordPress 7 and WooCommerce 
10+.

### I need help or have a suggestion. How can I contact the developer?

You can reach the developer through the [contact page](https://mokhtarbensaid.com/contact/).

## 评价

![](https://secure.gravatar.com/avatar/4ce628d6c37c97d8bf7dbe1779249bf47e702d3d1ce415f64d7423a96b2caae9?
s=60&d=retro&r=g)

### 󠀁[Clean, validated phone numbers at checkout — exactly what my store needed](https://wordpress.org/support/topic/clean-validated-phone-numbers-at-checkout-exactly-what-my-store-needed/)󠁿

 [Alain Aubry](https://profiles.wordpress.org/caban13/) 2026 年 8 月 3 日

Phone Validator with Flags for WooCommerce has quickly become essential on my site.
It adds a country flag and dial code dropdown directly to the billing phone field,
so customers can’t forget the country code or enter obvious nonsense. The real‑time
validation blocks invalid numbers before the order goes through, and the integration
with WooCommerce’s selling locations means only the countries I allow actually appear.
I’ve been using it for a short time and I can already see the difference: my customer
and order records now have properly formatted, internationally valid phone numbers
instead of random strings. Setup is simple, the settings page lets you configure
defaults and preferred countries, and it works smoothly with both Classic and Block
Checkout. If you run a WooCommerce store and care about data quality (and being 
able to actually contact your customers), this plugin is a no‑brainer.

![](https://secure.gravatar.com/avatar/e6e6286190b900f3c8378d1b1bc462e94576ea09d99d76b603050d80cefab7f8?
s=60&d=retro&r=g)

### 󠀁[Simple but powerful](https://wordpress.org/support/topic/simple-but-powerful-96/)󠁿

 [tommynguyen0710](https://profiles.wordpress.org/tommynguyen0710/) 2026 年 5 月
29 日 1 回复

this plugin is simple but solve all my problem, thank you so much

![](https://secure.gravatar.com/avatar/73c93dd13fb5582ce5e722a352a74d440fb35e0f4e6f296272e908d020fe4a50?
s=60&d=retro&r=g)

### 󠀁[Oh my God](https://wordpress.org/support/topic/oh-my-god-12/)󠁿

 [azizq89](https://profiles.wordpress.org/azizq89/) 2026 年 5 月 26 日 1 回复

Oh my God,this plugin solved the problem for me.Its stability is excellent. I used
to wonder why there wasn’t a plugin that could handle this feature efficiently and
without issues.

![](https://secure.gravatar.com/avatar/b5d2ed5a3d35a871e50cf8b0eff5a4050987091198e2ff032fbcff26d3c8ac3e?
s=60&d=retro&r=g)

### 󠀁[Thank you so much!](https://wordpress.org/support/topic/thank-you-so-much-195/)󠁿

 [mlbrand](https://profiles.wordpress.org/mlbrand/) 2025 年 9 月 8 日

Wondreful working plugin!

![](https://secure.gravatar.com/avatar/244b06320f1941ee604cd09da1e4405106e38d7b748fedb581737b3f4318081f?
s=60&d=retro&r=g)

### 󠀁[Does what it says it does](https://wordpress.org/support/topic/does-what-it-says-it-does-123/)󠁿

 [fredsjo](https://profiles.wordpress.org/fredsjo/) 2025 年 9 月 1 日

Thank you!

![](https://secure.gravatar.com/avatar/ad8b97038c60233be15920e9095b8e00524bd694492eb9663e1013864621735a?
s=60&d=retro&r=g)

### 󠀁[Excellent plugin with full country support](https://wordpress.org/support/topic/excellent-plugin-with-full-country-support/)󠁿

 [sultan456](https://profiles.wordpress.org/sultan456/) 2025 年 8 月 20 日 1 回复

This plugin is excellent and supports all countries. The best part is that I was
able to set Saudi Arabia as the default number, so customers don’t have to change
the country manually. It saved me time and made the customer experience much smoother.
Highly recommended!

 [ 阅读所有9条评价 ](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/)

## 贡献者及开发者

「Phone Validator with Flags for WooCommerce」是开源软件。 以下人员对此插件做出了
贡献。

贡献者

 *   [ Mokhtar Bensaid ](https://profiles.wordpress.org/mokhtarbsaid/)

「Phone Validator with Flags for WooCommerce」插件已被翻译至 2 种本地化语言。 感谢
[所有译者](https://translate.wordpress.org/projects/wp-plugins/phone-validator-with-flags-for-woocommerce/contributors)
为本插件所做的贡献。

[帮助将「Phone Validator with Flags for WooCommerce」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/phone-validator-with-flags-for-woocommerce)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/phone-validator-with-flags-for-woocommerce/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/phone-validator-with-flags-for-woocommerce/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/phone-validator-with-flags-for-woocommerce/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/phone-validator-with-flags-for-woocommerce/)。

## 更新日志

#### 1.0.0

 * Initial release with flag selector, validation, and WooCommerce integration.

#### 1.1.0

 * Fix some technical issues about the error alert.

#### 1.2.0

 * Fix some technical issues.

#### 1.3.0

 * Fix compatibility issues.

#### 2.0.0

 * Full support for WooCommerce Block Checkout (Gutenberg).
 * Added dedicated settings page under WooCommerce  Settings  Phone Validator.
 * Added support for shipping phone field with Shipping Locations filtering.
 * Added support for My Account phone field.
 * Added preferred countries option with visual divider.
 * Added inline error messages styled to match WooCommerce notices.
 * Updated intl-tel-input library from v18.1.1 to v29.0.1.
 * Default country now uses WooCommerce store location automatically.
 * Fixed double initialization bug.
 * Compatible with WordPress 7 and WooCommerce 10+.
 * Code refactored and split into dedicated classes.

## 额外信息

 *  版本 **2.0.0**
 *  最后更新：**5 月前**
 *  活跃安装数量 **1,000+**
 *  WordPress 版本 ** 6.8 或更高版本 **
 *  已测试的最高版本为 **6.9.10**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [Arabic](https://ar.wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/)、
   [English (US)](https://wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/)
   和 [Russian](https://ru.wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/phone-validator-with-flags-for-woocommerce)
 * 标签
 * [checkout](https://cn.wordpress.org/plugins/tags/checkout/)[country flags](https://cn.wordpress.org/plugins/tags/country-flags/)
   [phone field](https://cn.wordpress.org/plugins/tags/phone-field/)[phone validation](https://cn.wordpress.org/plugins/tags/phone-validation/)
   [woocommerce](https://cn.wordpress.org/plugins/tags/woocommerce/)
 *  [高级视图](https://cn.wordpress.org/plugins/phone-validator-with-flags-for-woocommerce/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  9 条 5 星评价     ](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/reviews/)

## 贡献者

 *   [ Mokhtar Bensaid ](https://profiles.wordpress.org/mokhtarbsaid/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/phone-validator-with-flags-for-woocommerce/)