=== Phone Validator with Flags for WooCommerce ===
Contributors: mokhtarbsaid
Tags: woocommerce, checkout, phone validation, phone field, country flags
Requires at least: 6.8
Tested up to: 6.9.4
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds a country flag and phone validation to the checkout phone field.

== Description ==

**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 or letting the customer choose.
- Validating the phone number format in real-time.
- Respecting WooCommerce's "Selling Locations" settings to limit the list of countries.

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

== Features ==

* Add country flags and dial codes to the checkout phone field.
* Validate phone numbers in real-time before submission.
* Supports only countries enabled in WooCommerce → Selling Locations.
* GDPR-safe and does not rely on any external APIs.
* Compatible with High-Performance Order Storage (HPOS).
* Lightweight and fully self-contained.
* Translation-ready.

== Installation ==

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. The billing phone field on the checkout page will now display with country flag + validation.

== Libraries Used ==

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

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



== Frequently Asked Questions ==

= 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 custom phone fields? =
Currently, it only targets the default WooCommerce `billing_phone` field at checkout.

= What if the user enters an invalid phone number? =
An alert will appear, and the order will not be submitted until a valid phone number is entered.

= Does it support HPOS? =
Yes. This plugin officially declares compatibility with WooCommerce High-Performance Order Storage.

== Screenshots ==

1. Enhanced checkout phone field with country flag.
2. Dropdown with country flags filtered by Selling Locations.
3. Alert shown if phone number is invalid before order is placed.

== Changelog ==

= 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

== Upgrade Notice ==

= 1.0.0 =
This is the initial stable release.

= 1.1.0 =
Fix technical issues 

= 1.2.0 =
Fix technical issues 

= 1.3.0 =
Fix compatibility issues 