SHIFT64 Phone Validation for WooCommerce checks the phone numbers customers type at WooCommerce checkout. It rejects numbers that cannot exist in the customer’s country and can rewrite valid numbers into one consistent format before they are saved on the order. All checks run on your own server with the rules of Google’s open-source libphonenumber.
It checks that a number is valid. It does not send SMS messages or one-time codes, and it does not confirm that the customer owns the number.
600 123 456 with a Polish address is understood as +48 600 123 456.00 becomes +. Typographic dashes (–) are still rejected by WooCommerce’s own phone check.+ or 00).+48600123456), international (+48 600 123 456) and national (600 123 456). Formatting on save can be switched off.Requires WordPress 7.1 or later and WooCommerce 7.2 or later.
The plugin makes no external HTTP requests and sends no data anywhere. Validation runs entirely on your server with rules bundled in the plugin. It sets no cookies and stores no personal data of its own, only its settings.
While validation is on, non-breaking and other Unicode spaces in a typed number become plain spaces. With “Enable Formatting on Save” on, the phone numbers of the order being placed are saved in the selected format; on the block checkout WooCommerce also copies them to the customer’s account. Nothing else is changed.
Filters: shift64_phone_validation_should_validate (skip a field or an order), shift64_phone_validation_formatted_phone (change the stored value), shift64_phone_validation_error_message (reword messages) and shift64_phone_validation_enqueue_assets (turn off the highlighting scripts). The helper Shift64\SmartPhoneValidation\format_phone() formats a number for your own code and returns null when it is not valid. Signatures and examples: developer documentation.
Formatting on save is on by default. Before going live, check every system that reads the order phone (exports, courier labels, SMS gateways): with E.164, 600 100 200 is stored as +48600100200.
Phone number rules come from libphonenumber-for-php-lite by Joshua Gigg, a PHP port of Google’s libphonenumber (Apache License 2.0), bundled with symfony/polyfill-mbstring (MIT). Neither connects to any external service. Apache 2.0 is compatible with GPLv3, so the plugin as a whole is distributed under the GPL through the “or later” clause.
Created and maintained by Mateusz Zadorożny at SHIFT64.
Sponsored by SHIFT64.