{"id":240363,"date":"2025-07-12T11:21:53","date_gmt":"2025-07-12T11:21:53","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/phone-validator-with-flags-for-woocommerce\/"},"modified":"2026-05-25T06:08:02","modified_gmt":"2026-05-25T06:08:02","slug":"phone-validator-with-flags-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/ms.wordpress.org\/plugins\/phone-validator-with-flags-for-woocommerce\/","author":22012716,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.0","stable_tag":"2.0.0","tested":"6.9.4","requires":"6.8","requires_php":"7.4","requires_plugins":null,"header_name":"Phone Validator with Flags for WooCommerce","header_author":"Mokhtar Bensaid","header_description":"Adds a country flag and phone validation to the woocommerce checkout phone field.","assets_banners_color":"167a68","last_updated":"2026-05-25 06:08:02","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/mokhtarbensaid.com","rating":5,"author_block_rating":0,"active_installs":800,"downloads":3508,"num_ratings":6,"support_threads":1,"support_threads_resolved":1,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"mokhtarbsaid","date":"2025-07-12 11:21:35"},"1.1.0":{"tag":"1.1.0","author":"mokhtarbsaid","date":"2025-08-13 17:48:16"},"1.2.0":{"tag":"1.2.0","author":"mokhtarbsaid","date":"2025-08-20 15:30:38"},"1.3.0":{"tag":"1.3.0","author":"mokhtarbsaid","date":"2026-04-04 13:30:40"},"2.0.0":{"tag":"2.0.0","author":"mokhtarbsaid","date":"2026-05-25 06:08:02"}},"upgrade_notice":{"1.0.0":"<p>This is the initial stable release.<\/p>","2.0.0":"<p>Major update. Adds Block Checkout support, settings page, shipping phone field, and updated intl-tel-input library. Compatible with WordPress 7 and WooCommerce 10+. Recommended for all users.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":6},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3545396,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3545396,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3545396,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3545396,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.2.0","1.3.0","2.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3545396,"resolution":"1","location":"assets","locale":"","width":1200,"height":675},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3545396,"resolution":"2","location":"assets","locale":"","width":1200,"height":675},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3545396,"resolution":"3","location":"assets","locale":"","width":1200,"height":675},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3545396,"resolution":"4","location":"assets","locale":"","width":1200,"height":675}},"screenshots":{"1":"Enhanced checkout phone field with country flag and dial code.","2":"Enhanced Account addresses phone field with country flag and dial code.","3":"Plugin settings page part 1 under WooCommerce \u2192 Settings \u2192 Phone Validator .","4":"Plugin settings page part 2 under WooCommerce \u2192 Settings \u2192 Phone Validator."}},"plugin_section":[],"plugin_tags":[3148,159831,149230,226304,286],"plugin_category":[45],"plugin_contributors":[236985],"plugin_business_model":[],"class_list":["post-240363","plugin","type-plugin","status-publish","hentry","plugin_tags-checkout","plugin_tags-country-flags","plugin_tags-phone-field","plugin_tags-phone-validation","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-mokhtarbsaid","plugin_committers-mokhtarbsaid"],"banners":{"banner":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/banner-772x250.jpg?rev=3545396","banner_2x":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/banner-1544x500.jpg?rev=3545396","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/icon-128x128.png?rev=3545396","icon_2x":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/icon-256x256.png?rev=3545396","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/screenshot-1.png?rev=3545396","caption":"Enhanced checkout phone field with country flag and dial code."},{"src":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/screenshot-2.png?rev=3545396","caption":"Enhanced Account addresses phone field with country flag and dial code."},{"src":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/screenshot-3.png?rev=3545396","caption":"Plugin settings page part 1 under WooCommerce \u2192 Settings \u2192 Phone Validator ."},{"src":"https:\/\/ps.w.org\/phone-validator-with-flags-for-woocommerce\/assets\/screenshot-4.png?rev=3545396","caption":"Plugin settings page part 2 under WooCommerce \u2192 Settings \u2192 Phone Validator."}],"raw_content":"<!--section=description-->\n<p><strong>Phone Validator with Flags for WooCommerce<\/strong> enhances the billing phone field on the checkout page by:<\/p>\n\n<ul>\n<li>Displaying a dropdown with country flags and dial codes.<\/li>\n<li>Auto-detecting the default country based on your WooCommerce store location.<\/li>\n<li>Validating the phone number format before order submission.<\/li>\n<li>Respecting WooCommerce's \"Selling Locations\" settings to limit the list of countries.<\/li>\n<li>Supporting both Classic Checkout and Block Checkout (introduced in WooCommerce 8+).<\/li>\n<li>Allowing full customization via a dedicated settings page under WooCommerce \u2192 Settings \u2192 Phone Validator.<\/li>\n<li>Supporting the shipping phone field independently from the billing phone field.<\/li>\n<\/ul>\n\n<p>Ideal for WooCommerce stores targeting international customers who want to ensure clean, valid phone numbers during checkout.<\/p>\n\n<p>Have a question or need help? <a href=\"https:\/\/mokhtarbensaid.com\/contact\/\">Contact the developer<\/a>.<\/p>\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Add country flags and dial codes to the checkout phone field.<\/li>\n<li>Validate phone numbers in real-time before submission.<\/li>\n<li>Full support for WooCommerce Block Checkout (Gutenberg).<\/li>\n<li>Supports billing phone, shipping phone, and My Account phone fields independently.<\/li>\n<li>Set preferred countries to appear at the top of the dropdown with a visual divider.<\/li>\n<li>Choose between all countries or only WooCommerce Selling Locations.<\/li>\n<li>Shipping phone field uses WooCommerce Shipping Locations automatically.<\/li>\n<li>Inline error messages styled to match WooCommerce notices.<\/li>\n<li>Respects WooCommerce field validation rules automatically.<\/li>\n<li>Compatible with WordPress 7 and WooCommerce 10+.<\/li>\n<li>GDPR-safe - no external APIs, fully self-hosted.<\/li>\n<li>Compatible with High-Performance Order Storage (HPOS).<\/li>\n<li>Lightweight and translation-ready.<\/li>\n<\/ul>\n\n<h3>Libraries Used<\/h3>\n\n<p>This plugin includes the following third-party open source library:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/jackocnr\/intl-tel-input\">intl-tel-input<\/a> v29.0.1 - JavaScript international phone input utility.\nSource: https:\/\/github.com\/jackocnr\/intl-tel-input\nLicense: MIT<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Ensure that WooCommerce is active and \"Selling Locations\" are configured.<\/li>\n<li>Go to WooCommerce \u2192 Settings \u2192 Phone Validator to configure the plugin.<\/li>\n<li>The billing phone field on the checkout page will now display with country flag and validation.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20send%20data%20to%20third-party%20services%3F\"><h3>Does this plugin send data to third-party services?<\/h3><\/dt>\n<dd><p>No. All assets and logic are fully self-hosted. No external scripts, APIs, or CDNs are used.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20work%20with%20woocommerce%20block%20checkout%3F\"><h3>Does this plugin work with WooCommerce Block Checkout?<\/h3><\/dt>\n<dd><p>Yes. Since version 2.0.0 the plugin fully supports Block Checkout introduced in WooCommerce 8+.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20work%20with%20custom%20phone%20fields%3F\"><h3>Does this plugin work with custom phone fields?<\/h3><\/dt>\n<dd><p>Currently it targets the default WooCommerce billing_phone, shipping_phone, and My Account phone fields.<\/p><\/dd>\n<dt id=\"what%20if%20the%20user%20enters%20an%20invalid%20phone%20number%3F\"><h3>What if the user enters an invalid phone number?<\/h3><\/dt>\n<dd><p>An inline error message will appear styled to match WooCommerce notices, and the order will not be submitted until a valid number is entered.<\/p><\/dd>\n<dt id=\"does%20it%20support%20hpos%3F\"><h3>Does it support HPOS?<\/h3><\/dt>\n<dd><p>Yes. This plugin officially declares compatibility with WooCommerce High-Performance Order Storage.<\/p><\/dd>\n<dt id=\"can%20i%20set%20a%20default%20country%3F\"><h3>Can I set a default country?<\/h3><\/dt>\n<dd><p>Yes. You can set a default country from WooCommerce \u2192 Settings \u2192 Phone Validator. The default behavior uses your WooCommerce store country automatically.<\/p><\/dd>\n<dt id=\"can%20i%20show%20preferred%20countries%20at%20the%20top%20of%20the%20list%3F\"><h3>Can I show preferred countries at the top of the list?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20support%20the%20shipping%20phone%20field%3F\"><h3>Does it support the shipping phone field?<\/h3><\/dt>\n<dd><p>Yes. You can enable the shipping phone field independently from WooCommerce \u2192 Settings \u2192 Phone Validator. The shipping phone dropdown will only show countries from your WooCommerce Shipping Locations.<\/p><\/dd>\n<dt id=\"is%20it%20compatible%20with%20wordpress%207%20and%20the%20latest%20woocommerce%3F\"><h3>Is it compatible with WordPress 7 and the latest WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. The plugin is fully tested and compatible with WordPress 7 and WooCommerce 10+.<\/p><\/dd>\n<dt id=\"i%20need%20help%20or%20have%20a%20suggestion.%20how%20can%20i%20contact%20the%20developer%3F\"><h3>I need help or have a suggestion. How can I contact the developer?<\/h3><\/dt>\n<dd><p>You can reach the developer through the <a href=\"https:\/\/mokhtarbensaid.com\/contact\/\">contact page<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release with flag selector, validation, and WooCommerce integration.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Fix some technical issues about the error alert.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Fix some technical issues.<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Fix compatibility issues.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Full support for WooCommerce Block Checkout (Gutenberg).<\/li>\n<li>Added dedicated settings page under WooCommerce \u2192 Settings \u2192 Phone Validator.<\/li>\n<li>Added support for shipping phone field with Shipping Locations filtering.<\/li>\n<li>Added support for My Account phone field.<\/li>\n<li>Added preferred countries option with visual divider.<\/li>\n<li>Added inline error messages styled to match WooCommerce notices.<\/li>\n<li>Updated intl-tel-input library from v18.1.1 to v29.0.1.<\/li>\n<li>Default country now uses WooCommerce store location automatically.<\/li>\n<li>Fixed double initialization bug.<\/li>\n<li>Compatible with WordPress 7 and WooCommerce 10+.<\/li>\n<li>Code refactored and split into dedicated classes.<\/li>\n<\/ul>","raw_excerpt":"Adds a country flag and phone validation to the WooCommerce checkout phone field. Supports Classic and Block Checkout.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/240363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=240363"}],"author":[{"embeddable":true,"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mokhtarbsaid"}],"wp:attachment":[{"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=240363"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=240363"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=240363"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=240363"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=240363"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ms.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=240363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}