International Telephone Box

WooCommerce · Free

WooCommerce phone validation

International Telephone Box validates phone numbers on WooCommerce checkout, in the browser and on the server, and saves every number in E.164. It works on the classic checkout, the Checkout block and My Account.

Classic checkout

The billing phone field gets flags, dial codes and validation as soon as the plugin is active. An invalid number shows a clear message and the order doesn't go through.

The Checkout block

Yes, it works with the Checkout block. The number is synced to the block, an invalid number shows the block's own error under the field, and the order is validated again on the server before payment.

  • Checkout block server validation needs WooCommerce 9.9+.

My Account → Addresses

Customers editing their billing address in My Account get the same field and the same checks.

Server validation

Every number is checked again on the server with libphonenumber, Google's phone number data. An invalid number, or one from a country you don't offer, stops the order with a clear message.

  • Needs PHP 8.1+. Older PHP keeps browser validation.
  • Understands numbers that start with 00 and Arabic-Indic digits (٠١٠…).

E.164 on every order

Orders and customers store the number in one format, E.164, like +201012345678. It's ready for delivery companies, SMS and WhatsApp, with no clean-up.

Follows the billing country

While the phone field is empty, its country follows the billing country the customer picks, so the right dial code is already there.

Make the phone field required

WooCommerce decides whether the phone field is required. Set it in one place:

Checkout block

  1. Edit the Checkout page.
  2. Select the Checkout block.
  3. Set Phone to Required.

Classic checkout

  1. Go to Appearance → Customize → WooCommerce → Checkout.
  2. Set the phone field to Required.

The WooCommerce section

Phone Box → Countries has a WooCommerce section where you can turn each of these off:

Validate phone numbers at checkout

Check the number on the server before the order is placed.

Match the phone country to the billing country

Follow the billing country while the phone field is empty.

Also apply to the shipping phone

Give the shipping phone the same field and checks.

Requirements

WooCommerceOptional, tested up to 11.3
Checkout block server validationWooCommerce 9.9+
Server-side validationPHP 8.1+ (older PHP keeps browser validation)
PHP8.1+

Questions, answered

How do I validate phone numbers in WooCommerce checkout?

Install International Telephone Box. It validates the phone number on the classic checkout, the Checkout block and My Account, first in the browser and then on the server with libphonenumber, and an invalid number stops the order with a clear message. Server validation needs PHP 8.1+.

Does it work with the WooCommerce Checkout block?

Yes. The number is synced to the Checkout block, an invalid number shows the block's own error under the field, and the order is validated again on the server before payment (WooCommerce 9.9+).

How do I make the phone field required in WooCommerce?

WooCommerce controls that. For the Checkout block, edit the Checkout page, select the Checkout block and set Phone to Required. For the classic checkout, go to Appearance → Customize → WooCommerce → Checkout.

Which PHP version do I need?

PHP 7.4 or newer. Server-side validation needs PHP 8.1+; on older PHP the plugin keeps working with browser validation only.