Select one or more tags, then press “Search Plugins”

Find Plugin with any / all of the selected criteria
Search Plugin

SHIFT64 Phone Validation For WooCommerce Wordpress Plugin - Rating, Reviews, Demo & Download

SHIFT64 Phone Validation For WooCommerce Preview Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

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.

Features

  • Validates the billing and shipping phone numbers when the order is placed. Empty fields are not checked; whether a phone is required stays a WooCommerce setting.
  • Works with both the block checkout (Store API) and the classic shortcode checkout.
  • Reads numbers in the context of the address country, so 600 123 456 with a Polish address is understood as +48 600 123 456.
  • Cleans up input first: spaces (including non-breaking spaces pasted from documents), hyphens, dots, slashes and parentheses are removed, and a leading 00 becomes +. Typographic dashes (–) are still rejected by WooCommerce’s own phone check.
  • Two validation modes: “Default country + international”, or “International only” (every number must include its country prefix, typed with + or 00).
  • Three output formats: E.164 (+48600123456), international (+48 600 123 456) and national (600 123 456). Formatting on save can be switched off.
  • Highlights the phone field that needs correcting.
  • Compatible with High-Performance Order Storage (HPOS) and the Cart and Checkout blocks.
  • English and Polish error messages.
  • Filters for developers.

Requires WordPress 7.1 or later and WooCommerce 7.2 or later.

What it does not do

  • It does not send SMS messages, one-time passwords or verification codes.
  • It does not call the number or confirm that the customer owns it or can be reached on it.
  • It does not look numbers up with carriers or any third-party service.
  • It does not add a country flag picker or an input mask to the phone field.
  • It does not check phone numbers outside the checkout, such as orders created or edited in the admin, or My Account addresses. Paying for an existing order through the Store API counts as checkout.

Privacy

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.

For developers

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 Shift64SmartPhoneValidationformat_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.

Third-party library

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.

Credits

Created and maintained by Mateusz Zadorożny at SHIFT64.

Sponsored by SHIFT64.

Screenshots

  1. The Phone Validation tab under WooCommerce > Settings.

    The Phone Validation tab under WooCommerce > Settings.

  2. Classic checkout rejecting an invalid phone number, with the phone field highlighted.

    Classic checkout rejecting an invalid phone number, with the phone field highlighted.

  3. Block checkout rejecting an invalid phone number.

    Block checkout rejecting an invalid phone number.

  4. A phone number stored in E.164 format on the order edit screen.

    A phone number stored in E.164 format on the order edit screen.


Reviews & Comments