Log In

Forgot Your Password? Create an Account
or

Continue with

Skip to content
  • About
  • Blog
  • Knowledge Base
  • Support Center
  • Contact Us
Top Bar Menu
My Account
Login/Register
 2

View CartCheckout

  • ×Magento 2 Hide Price, Request a Quote & WhatsApp Pro Magento 2 Hide Price, Request a Quote & WhatsApp Pro1 × $199.00
  • ×Magento 2 Ai PdfCustomiser Magento 2 Ai PdfCustomiser1 × $349.00

Subtotal: $548.00

View CartCheckout

Software Development Services | Magento Ecommerce | Woocommerce | Web Development | Mobile App Development
Webcloud – Global IT Service Provider
Software Development Services | Magento Ecommerce | Woocommerce | Web Development | Mobile App Development
  • Magento® 2 Extensions
  • Woocommmerce
  • Ecommerce Solutions
  • Services
    • Web Development Services
    • Ecommerce Development Services
    • Web Design Services
    • Mobile App Development Services
    • Custom App Development Services
    • Podcast Services
Search:
  • Magento® 2 Extensions
  • Woocommmerce
  • Ecommerce Solutions
  • Services
    • Web Development Services
    • Ecommerce Development Services
    • Web Design Services
    • Mobile App Development Services
    • Custom App Development Services
    • Podcast Services

Checkout Magento 2 Country Code Phone & WhatsApp Field

“Magento 2 Ai PdfCustomiser” has been added to your cart. View cart
Home > Checkout Magento 2 Country Code Phone & WhatsApp Field
Sale!
Checkout Magento 2 Country Code Phone & WhatsApp Field
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 2
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 3
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 4
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 5
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 6
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 7
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 8
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 9
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 10
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 11
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 12
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 13
Checkout Magento 2 Country Code Phone & WhatsApp Field - Image 14
DOCUMENTATION
✔
Hyva READY
2.4.8-p3; 2.4.7-p8; 2.4.6-p13; 2.4.5-p15

Checkout Magento 2 Country Code Phone & WhatsApp Field

0 Reviews | Write a Review

Enhance your Magento 2 checkout with a smart country phone selector and optional WhatsApp field. Improve customer communication, ensure accurate data with real-time validation, and boost conversions with a seamless, user-friendly checkout experience compatible with Hyvä and Luma themes.

Key Features

  • Country Phone Selector with Flags — Intuitive country code selection for a better checkout experience
  • Optional WhatsApp Field — Enable a WhatsApp number field with a convenient “Copy from phone” option
  • Real-time Validation & Fraud Protection — Validate number formats dynamically to ensure accuracy and reduce fake entries
  • WhatsApp Order Integration — Add clickable WhatsApp links in order details for quick customer communication
  • Advanced Admin Configuration — Fully customizable settings to enable/disable features and adjust field behavior
  • Hyvä & Luma Compatible — Optimized performance with support for both modern and default Magento themes
  • GDPR Compliant Solution — Secure data handling with no external API calls and privacy-focused validation
  • Lightweight & Extendable Architecture — Built with observers, plugins, and standalone scripts for flexibility and performance
$149.00 $99.00 $99.00

Optional Services

  • Description
  • FAQ 8+
  • Reviews (0)
  • Specifications
  • Changelog
  • Installation
  • Support

1 Overview

Magento 2 v PHP >=8.1 Hyva Compatible

Enhance Magento 2 checkouts with intuitive country phone selector and WhatsApp integration.

Ewebecommerce's CountryPhone extension enhances your Magento 2 checkout process with modern integrations such as a country-specific phone number selector and optional WhatsApp input field. Leveraging real-time validation, this tool ensures data integrity by adhering to country-specific and fraud-detection algorithms without external API reliance. It seamlessly integrates with both Luma and Hyva themes, respecting GDPR guidelines and local storage solutions.

Tailored for businesses that require precise customer communication, the extension supports WhatsApp links in both admin and customer-facing views, improving order tracking and communication without complicating the means. Built-in features like auto-detection of country codes deliver a sophisticated yet user-friendly experience. Extend your Magento functionalities with this robust module, leveraging intuitive interfaces while enhancing fraud prevention measures.

At a Glance

  • Country phone selector with flags
  • Optional WhatsApp field integration
  • Real-time phone validation
  • Fraud detection and prevention
  • GDPR-friendly with no external API hits
  • Hyva and Luma theme compatibility
37
PHP Files
0
Controllers
15
Models
3
DB Tables
3
Events
6
Plugins
Module Ewebecommerce_CountryPhone
Composer ewebecommerce/module-country-phone
Version  
PHP >=8.1
Compatibility Magento Framework >=103.0.7
Hyva Compatible
Checkout: Country Code Autocomplete Feature
Checkout: Country Code Autocomplete Feature

During the checkout process, customers can utilize the country code autocomplete feature to quickly find and select the correct country code for their phone number. This streamlines their checkout experience and minimizes errors in phone number entries, contributing to accurate data collection.

2 Features

01

Country code autocomplete with flags

02

Real-time input validation

03

Auto-detect country based on store location

04

Ensure phone number validity

05

Configureable default country

06

Optional WhatsApp number field

07

WhatsApp link on order details

08

Customizable labels and messages

09

Real-time phone validation

10

Country flags for WhatsApp number

11

Enable fraud detection settings

12

Configure fraud score thresholds

13

AI-enhanced fraud checks

14

Notify users of risky inputs

15

Block suspicious numbers

Phone Selector Features

Enhance checkouts with a dynamic phone number input system.

  • Country code autocomplete with flags
  • Real-time input validation
  • Auto-detect country based on store location
  • Ensure phone number validity
  • Configureable default country
Frontend: Country Code Autocomplete Feature
Frontend: Country Code Autocomplete Feature

Customers interact with a user-friendly phone number field that supports autocomplete for country codes, complete with flag icons. This intuitive feature speeds up the selection process and reduces data entry errors during checkout.

WhatsApp Integration

Integrate WhatsApp smoothly into your checkout process.

  • Optional WhatsApp number field
  • WhatsApp link on order details
  • Customizable labels and messages
  • Real-time phone validation
  • Country flags for WhatsApp number
Admin: WhatsApp Integration Settings
Admin: WhatsApp Integration Settings

This screen is for configuring WhatsApp integration on checkout forms. Admins can enable the WhatsApp field, set a default country, and define validation messages. It adds convenience for customers to include their WhatsApp details, enhancing communication possibilities.

Admin: Visual Configuration for WhatsApp
Admin: Visual Configuration for WhatsApp

On the 'Visual Settings' page, set whether to display country flags in the WhatsApp selector and whether to show WhatsApp details on order views. These settings improve the visual appeal and functionality of your checkout process.

Fraud Detection Mechanisms

Enhance security with robust fraud detection setups.

  • Enable fraud detection settings
  • Configure fraud score thresholds
  • AI-enhanced fraud checks
  • Notify users of risky inputs
  • Block suspicious numbers
Admin: Fraud Detection Configuration
Admin: Fraud Detection Configuration

The 'Fraud Detection Settings' section allows you to configure how the system handles potentially fraudulent phone numbers by setting fraud score thresholds and displaying fraud scores to customers. This ensures that high-risk phone numbers are flagged, improving security during the checkout process.

3 Configuration Walkthrough

Navigate to Stores → Configuration in Magento Admin and follow these steps:

1

Enable the Module

To enable the CountryPhone module, navigate to Stores > Configuration > Ewebecommerce Extensions. In the General Settings, toggle Enable Country Phone to 'Yes'. Set the Default Country for convenience and decide if the country should be auto-detected.

Admin: General Settings for Country Phone
Admin: General Settings for Country Phone

In the 'General Settings' screen, admins can enable the country phone selector, set the default country, and choose whether to auto-detect the country based on store location. It is crucial for configuring how phone numbers are handled in checkout, ensuring users have a seamless experience while entering their numbers.

2

Configure Fraud Detection

Within the same configuration section, open Fraud Detection Settings. Enable fraud detection by setting a Fraud Score Threshold and configuring how to handle VOIP numbers. Consider AI-based scoring to bolster rule-based detection for added security.

Admin: Fraud Detection Configuration
Admin: Fraud Detection Configuration

The 'Fraud Detection Settings' section allows you to configure how the system handles potentially fraudulent phone numbers by setting fraud score thresholds and displaying fraud scores to customers. This ensures that high-risk phone numbers are flagged, improving security during the checkout process.

3

Setup WhatsApp Integration

In WhatsApp Integration Settings, select Enable WhatsApp Field to allow users to input a WhatsApp number. Define the Default Country for WhatsApp and configure field requirements and validation feedback accordingly.

Admin: WhatsApp Integration Settings
Admin: WhatsApp Integration Settings

This screen is for configuring WhatsApp integration on checkout forms. Admins can enable the WhatsApp field, set a default country, and define validation messages. It adds convenience for customers to include their WhatsApp details, enhancing communication possibilities.

4

Customize WhatsApp Field

Within Field Labels & Placeholders, customize WhatsApp input with specific labels, a placeholder, and hint text to guide users clearly. This configurability helps align the interface with your store's branding.

Admin: WhatsApp Field Placeholder Settings
Admin: WhatsApp Field Placeholder Settings

Use this screen to personalize the WhatsApp input field by setting its label, placeholder text, and hint text. This customization helps align the UI with the store's branding and clarifies input expectations for customers.

5

Define Validation Messages

Under Validation Messages, specify the text for incorrect and suspicious input alerts. Customize messages for 'Invalid Number' and 'Fraud/Suspicious', tailoring customer notifications and ensuring input integrity.

Configuration: Validation Messages Settings
Configuration: Validation Messages Settings

On this screen, admins can customize validation messages for incorrect or suspicious phone numbers. These messages appear when the number fails country-specific length checks or is deemed potentially fraudulent. Configuring these messages helps enhance user communication and prevent input errors during the checkout process.

4 User Journey

1

Valid Phone Number Entry

During checkout, customers receive real-time feedback while entering their phone number and optional WhatsApp number, confirming accuracy before purchase. This validation ensures data accuracy and prevents submission errors.

Frontend: Valid Phone Number Input
Frontend: Valid Phone Number Input

This screen shows the successful entry of a validated phone number and optional WhatsApp number with real-time feedback, ensuring data accuracy before purchase completion. It's pivotal in confirming the user inputs are correct, minimizing errors.

2

Handling Phone Validation Errors

If an entered phone number is invalid, the system immediately alerts the customer, prompting correction. This reduces the likelihood of checkout errors and customer frustration, ensuring only valid data proceeds further.

Frontend: Phone Number Validation Error
Frontend: Phone Number Validation Error

Displays error handling during phone number entry, highlighting when an invalid number is detected. Users receive immediate feedback to correct their inputs, which is essential for maintaining a smooth checkout process and ensuring valid data submission.

3

Editing Customer Address

Customers can update their address book with new or modified phone numbers, complete with country selectors, ensuring consistent formatting. The integration of WhatsApp numbers adds efficiency in maintaining accurate contact details.

Frontend: Edit Customer Address
Frontend: Edit Customer Address

Customers edit their address details including phone and WhatsApp numbers on this screen. The integration of the country code selector ensures numbers are formatted correctly, enhancing validation and communication capabilities for further transactions.

4

View Address Book

In the customer account section, users have a comprehensive view of their addresses and registered contact numbers, including named WhatsApp contacts for seamless communication in future transactions.

Frontend: Customer Address Book Overview
Frontend: Customer Address Book Overview

Customers can view and manage their default billing and shipping addresses, now with the added convenience of displaying associated WhatsApp numbers. This integration assists users in ensuring their contact information is current and widely accessible, enhancing communication possibilities.

5 Use Cases

Streamlined Checkouts with Accurate Inputs

Magento stores looking to reduce checkout errors by offering a visual and intuitive interface for customers can leverage this extension to ensure accurate phone number entry, improving data reliability.

Enhanced Order Communication

Business owners need to streamline post-purchase communications. By adding WhatsApp integration within order information, store managers can contact customers directly and promptly.

Fraud Prevention

For businesses worried about fraudulent orders, setting fraud thresholds and automating checks help flag and reduce high-risk transactions, ensuring secure sales processes.

GDPR Compliance and Data Privacy

Companies focused on privacy can implement this module as it adheres to GDPR regulations by performing entirely local-validation, securing customer data without external dependencies.

Seamless Hyva Theme Integration

For stores using the Hyva theme, this extension caters to direct script integrations, ensuring compatibility and improved performance with Hyva-specific design considerations.

6 Installation Guide

  1. Open your command line interface and navigate to your Magento installation directory.

  2. Run: composer require ewebecommerce/country-phone to add the package to your Magento installation.

  3. Execute: bin/magento setup:upgrade to update your Magento database with the new module's setups.

  4. Compile your stores using: bin/magento setup:di:compile to ensure all dependencies are correctly generated.

  5. Finally, clear cached data with: bin/magento cache:clean for the changes to take effect fully on your frontend and backend.

7 Database Schema (3 Tables)

quote_address

Column Type Nullable
whatsapp_number   true

sales_order_address

Column Type Nullable
whatsapp_number   true

customer_address_entity

Column Type Nullable
whatsapp_number   true

8 Architecture

37
PHP
25
XML
11
PHTML
13
JS
4
CSS/LESS

Event Observers

Event Observer Area
sales_order_save_after SavePhoneToCustomerAddressAfterOrder global
customer_address_save_before SaveCustomerAddressWhatsAppObserver frontend
customer_address_save_after SaveWhatsAppAfterAddressSave frontend

Plugin Interceptors

Target Plugin
ShippingInformationManagement ShippingInformationManagementPlugin
Address AddressPlugin
ToOrderAddress ToOrderAddressPlugin
AddressRepositoryInterface AddWhatsAppToAddress
Http CspHeaderPlugin
DefaultConfigProvider DefaultConfigProvider

CLI Commands

Command Description
ewebecommerce:download-flags Download country flags to pub/media/country-flags

10 Tips & Tricks

  • Ensure all settings are reviewed post-installation in admin config.
  • Regularly update country flags for accurate user selection.
  • Test the checkout process post-upgrade to monitor field validations.
  • Use 'AI-enhanced' option for superior fraud detection.
  • Customize validation messages to suit your brand language.
  • Consider optional WhatsApp field if a full phone is already mandatory.
  • Align placeholder and label text to maintain brand tone.
  • Explore Hyva integrations to leverage theme-specific benefits.

11 Step-by-Step Screenshot Reference

Every captured screen in setup order. Click any image to open the full-size version in a new tab.

1

Admin: General Settings for Country Phone

What this shows: A configuration page with options to enable country phone, set a default country, auto-detect country, make the field required, use local flags, and enable phone validation.

In the 'General Settings' screen, admins can enable the country phone selector, set the default country, and choose whether to auto-detect the country based on store location. It is crucial for configuring how phone numbers are handled in checkout, ensuring users have a seamless experience while entering their numbers.

Admin: General Settings for Country Phone
2

Admin: Fraud Detection Configuration

What this shows: Settings to enable fraud detection, set fraud score threshold, show fraud scores, handle VOIP numbers, and use AI for detection.

The 'Fraud Detection Settings' section allows you to configure how the system handles potentially fraudulent phone numbers by setting fraud score thresholds and displaying fraud scores to customers. This ensures that high-risk phone numbers are flagged, improving security during the checkout process.

Admin: Fraud Detection Configuration
3

Admin: WhatsApp Integration Settings

What this shows: Options to enable WhatsApp field, set default country, make the field required, and customize validation messages.

This screen is for configuring WhatsApp integration on checkout forms. Admins can enable the WhatsApp field, set a default country, and define validation messages. It adds convenience for customers to include their WhatsApp details, enhancing communication possibilities.

Admin: WhatsApp Integration Settings
4

Admin: WhatsApp Field Placeholder Settings

What this shows: Fields to configure the label, placeholder, and hint text for the WhatsApp input field.

Use this screen to personalize the WhatsApp input field by setting its label, placeholder text, and hint text. This customization helps align the UI with the store's branding and clarifies input expectations for customers.

Admin: WhatsApp Field Placeholder Settings
5

Admin: Visual Configuration for WhatsApp

What this shows: Options to show country flags in the selector and display WhatsApp on order details.

On the 'Visual Settings' page, set whether to display country flags in the WhatsApp selector and whether to show WhatsApp details on order views. These settings improve the visual appeal and functionality of your checkout process.

Admin: Visual Configuration for WhatsApp
6

Frontend: Country Code Autocomplete Feature

What this shows: A customer-facing phone number input with an autocomplete dropdown showing country codes with flags.

Customers interact with a user-friendly phone number field that supports autocomplete for country codes, complete with flag icons. This intuitive feature speeds up the selection process and reduces data entry errors during checkout.

Frontend: Country Code Autocomplete Feature
7

Frontend: Valid Phone Number Input

What this shows: A checkout screen showing a validated phone and WhatsApp number.

This screen shows the successful entry of a validated phone number and optional WhatsApp number with real-time feedback, ensuring data accuracy before purchase completion. It's pivotal in confirming the user inputs are correct, minimizing errors.

Frontend: Valid Phone Number Input
8

Frontend: Phone Number Validation Error

What this shows: A checkout form indicating an invalid phone number with a validation error message.

Displays error handling during phone number entry, highlighting when an invalid number is detected. Users receive immediate feedback to correct their inputs, which is essential for maintaining a smooth checkout process and ensuring valid data submission.

Frontend: Phone Number Validation Error
9

Configuration: Validation Messages Settings

What this shows: This screen displays fields for configuring validation messages. There are text input fields for 'Invalid Number Message' and 'Fraud/Suspicious Message', with descriptions indicating when each message will be shown.

On this screen, admins can customize validation messages for incorrect or suspicious phone numbers. These messages appear when the number fails country-specific length checks or is deemed potentially fraudulent. Configuring these messages helps enhance user communication and prevent input errors during the checkout process.

Configuration: Validation Messages Settings
10

Frontend: Customer Address Book Overview

What this shows: The address book interface shows sections for 'Default Billing Address' and 'Default Shipping Address', each including a displayed WhatsApp number with options to change the addresses.

Customers can view and manage their default billing and shipping addresses, now with the added convenience of displaying associated WhatsApp numbers. This integration assists users in ensuring their contact information is current and widely accessible, enhancing communication possibilities.

Frontend: Customer Address Book Overview
11

Frontend: Edit Customer Address

What this shows: An address editing form displaying fields for name, company, phone number with country code selector, WhatsApp number, and address details including country and city.

Customers edit their address details including phone and WhatsApp numbers on this screen. The integration of the country code selector ensures numbers are formatted correctly, enhancing validation and communication capabilities for further transactions.

Frontend: Edit Customer Address
12

Admin: Order Details with WhatsApp Display

What this shows: Displays order overview information including WhatsApp number under 'Order & Account Information'. Navigation includes options like Invoices, Shipments, and Comments History.

Admins can view customer order details, including their WhatsApp number, allowing for streamlined communication with customers about orders and inquiries. This feature supports better customer relationship management and efficiency in handling orders.

Admin: Order Details with WhatsApp Display
13

Checkout: Country Code Autocomplete Feature

What this shows: During checkout, a phone number field with a country code dropdown is visible, which allows users to search and select their country code easily.

During the checkout process, customers can utilize the country code autocomplete feature to quickly find and select the correct country code for their phone number. This streamlines their checkout experience and minimizes errors in phone number entries, contributing to accurate data collection.

Checkout: Country Code Autocomplete Feature

9 Frequently Asked Questions

How can I enable the country phone number selector?

Navigate to Stores > Configuration > Ewebecommerce Extensions > Country Phone Settings and set Enable Country Phone to 'Yes'.

Is the WhatsApp field mandatory during checkout?

No, by default, the WhatsApp field is optional. However, you can configure it to be required by visiting WhatsApp Integration settings and setting Required WhatsApp Field to 'Yes'.

What validation is performed on phone numbers?

The extension performs country-specific validation using libphonenumber-js, ensuring the number meets local formatting rules and checking against fraud patterns. This validation improves data integrity and fraud prevention.

How does fraud detection work with this extension?

Fraud detection utilizes a rule-based approach with an optional AI-based scoring system to identify high-risk numbers, configurable through the fraud score threshold in your store settings.

Can I customize the field labels for phone and WhatsApp numbers?

Yes, visit the Field Labels & Placeholders section under WhatsApp Integration to customize field labels, placeholders, and hint text for aligned branding and user clarity.

Will this module work with both Luma and Hyva themes?

Yes, the module is compatible with both Luma and Hyva themes, making use of native structures and additional Hyva capabilities where applicable.

Do I need an external API for phone validation?

No, the validation process is GDPR-compliant, runs locally, and does not rely on external APIs, thus respecting data privacy.

How can I update the country flags used in the module?

Use the CLI command ewebecommerce:download-flags to download the latest country flags into your pub/media/country-flags directory.

Reviews

There are no reviews yet.

Be the first to review “Checkout Magento 2 Country Code Phone & WhatsApp Field” Cancel reply

Your email address will not be published. Required fields are marked *

Post comment

Version 1.0.0
Category Magento Extension
Compatibility Magento Framework >=103.0.7
PHP Version >=8.1
Released April 2026
Updated April 2026
License OSL-3.0
Browsers All modern browsers

Version 1.0.0 - October 2023

  • Initial release with country phone selector and WhatsApp field.
  • Added real-time validation and fraud detection features.
  • Introduced full compatibility with Luma and Hyvä themes.

Installation

Composer Installation

Install via composer to quickly integrate into Magento:

composer require ewebecommerce/country-phone

Then execute the following Magento commands to finish the installation:

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush

Manual Installation

Alternatively, download the package and upload to your Magento installation, following the same Magento commands for setup and execution.

12 Support & Contact

@

Email

support@webcloudsolutions.com

www

Portal

Support Portal

docs

Documentation

Browse Docs

Related products

  • Magento 2 Ai Email Template Designer
    Magento 2 Ai Email Template Designer $349.00 Original price was: $349.00.$299.00Current price is: $299.00.
    Add to cart
  • Magento 2 Ai PdfCustomiser
    Magento 2 Ai PdfCustomiser $399.00 Original price was: $399.00.$349.00Current price is: $349.00.
    Add to cart
  • Magento 2 Ai Registration Field Suite
    Magento 2 Ai Registration Field Suite $399.00 Original price was: $399.00.$349.00Current price is: $349.00.
    Add to cart
  • Magento 2 Hide Price, Request a Quote & WhatsApp Pro
    Magento 2 Hide Price, Request a Quote & WhatsApp Pro $299.00 Original price was: $299.00.$199.00Current price is: $199.00.
    Add to cart
  • Magento 2 Minimum Order Surcharge Pro
    Magento 2 Minimum Order Surcharge Pro $199.00 Original price was: $199.00.$149.00Current price is: $149.00.
    Add to cart
Locations
  • Canada Address
  • 363 boardwalk Waterloo , canada,
  • +1 (587) 434-8431
  • info@webcloud-solutions.com
  • Flag of India India Address
  • B013/00595,Randhwa Road,Mohali,Punjab
  • +91 788 887 3087
  • info@webcloud-solutions.com
Services
  • Web Design Services
  • Web Development Services
  • Ecommerce Devaelopment Services
  • Custom App Development Services
  • Mobile App Development Services
  • Digital Marketing Service
  • Podcast Services
Technologies
  • Magento
  • WooCommerce
  • Shopify
  • BigCommerce
  • Laravel Development Services
  • Android
  • iOS
  • Wordpress
Quick Links
  • Home
  • About Us
  • Services
  • Our Work
  • Contact Us
  • Support
  • Privacy Policy
  • Terms and Conditions

©Copyright 2026, Webcloud-solutions All rights reserved.