Title: KSA National Address Validator
Author: otoglobal
Published: <strong>ژانویه 29, 2026</strong>
Last modified: مارس 30, 2026

---

Search plugins

![](https://ps.w.org/ksa-national-address-validator/assets/icon-256x256.png?rev=
3457729)

# KSA National Address Validator

 By [otoglobal](https://profiles.wordpress.org/otoglobal/)

[Download](https://downloads.wordpress.org/plugin/ksa-national-address-validator.1.2.2.zip)

 * [Details](https://azb.wordpress.org/plugins/ksa-national-address-validator/#description)
 * [Reviews](https://azb.wordpress.org/plugins/ksa-national-address-validator/#reviews)
 *  [Installation](https://azb.wordpress.org/plugins/ksa-national-address-validator/#installation)
 * [Development](https://azb.wordpress.org/plugins/ksa-national-address-validator/#developers)

 [Support](https://wordpress.org/support/plugin/ksa-national-address-validator/)

## Description

This plugin enhances the WooCommerce checkout experience by adding a “National Address
Short Code” field. When a customer enters their 8-character short code, the plugin
communicates with the OTO National Address API to fetch and automatically populate
the checkout address fields (City, District, Street Address, etc.).

#### Features

 * Adds a National Address Short Code field to the WooCommerce checkout page (Classic
   and Blocks).
 * Field is shown only when Saudi Arabia is selected as the billing country.
 * Validates the format of the short code (4 letters followed by 4 digits, e.g. 
   ABCD1234).
 * Fetches address details from the OTO API and auto-fills City, District, Street,
   Postcode fields.
 * Optional: mark the field as required for Saudi Arabia orders only (non-SA orders
   are never blocked).
 * Connect/disconnect via email and password login (supports 2FA/TOTP).
 * Caches the API access token (55 minutes) to minimise API calls.
 * Compatible with WooCommerce High-Performance Order Storage (HPOS).
 * Fully compatible with both Classic checkout and WooCommerce Blocks checkout.

### External services

This plugin connects to the OTO API to validate Saudi Arabian National Address short
codes and retrieve address details during WooCommerce checkout.

#### What this service does

The OTO National Address API validates 8-character Saudi National Address short 
codes (e.g., ABCD1234) and returns the corresponding address information including
city, district, street name, building number, and postal code. This data is used
to automatically populate checkout address fields for customers in Saudi Arabia.

#### Data transmitted

**During plugin authentication (admin settings page):**
 – Email address and password
are sent to authenticate with the OTO API – If 2FA is enabled, the one-time password(
OTP) code is also sent – A refresh token is returned and stored to maintain the 
connection

**During checkout validation (when customer enters a short code):**
 – The National
Address short code entered by the customer is sent to the API – An access token (
obtained via the stored refresh token) is sent for authentication – Address data
is returned and used to populate checkout fields

#### Service provider

This service is provided by OTO Global.

 * Service website: [https://tryoto.com/](https://tryoto.com/)
 * Terms and Conditions: [https://www.tryoto.com/terms-and-conditions](https://www.tryoto.com/terms-and-conditions)
 * Privacy Policy: [https://www.tryoto.com/privacy-policy](https://www.tryoto.com/privacy-policy)

## Installation

 1. Upload the `ksa-national-address-validator` folder to the `/wp-content/plugins/`
    directory, or install directly from the WordPress.org plugin directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to **WooCommerce  KSA Validator** (or Settings  KSA Validator) and click **Connect**.
 4. Enter your OTO account email and password to authenticate. If your account uses
    two-factor authentication (2FA), select “2FA Enabled: Yes” and enter your OTP code.
 5. Once connected, the National Address Short Code field will appear automatically
    on the checkout page when Saudi Arabia is selected as the billing country.

## FAQ

### Where do I get an OTO account?

You can sign up for an OTO account at [https://tryoto.com/](https://tryoto.com/).

### Does this work with the WooCommerce Blocks checkout?

Yes. The plugin supports both the Classic checkout and the modern WooCommerce Blocks
checkout out of the box.

### Will non-Saudi Arabia customers be affected?

No. The shortcode field is hidden for all non-SA billing countries and validation
is completely skipped for non-SA orders, even when the “required” setting is enabled.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“KSA National Address Validator” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ otoglobal ](https://profiles.wordpress.org/otoglobal/)
 *   [ hammadoto ](https://profiles.wordpress.org/hammadoto/)

[Translate “KSA National Address Validator” into your language.](https://translate.wordpress.org/projects/wp-plugins/ksa-national-address-validator)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/ksa-national-address-validator/),
check out the [SVN repository](https://plugins.svn.wordpress.org/ksa-national-address-validator/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/ksa-national-address-validator/)
by [RSS](https://plugins.trac.wordpress.org/log/ksa-national-address-validator/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.2

 * Fixed: “Required” setting now correctly blocks Blocks checkout submission for
   Saudi Arabia orders when shortcode field is empty
 * Fixed: Non-SA countries can now complete Blocks checkout without being incorrectly
   blocked by the required shortcode validation
 * Fixed: Classic checkout no longer enforces shortcode required validation for 
   non-Saudi Arabia orders on server-side
 * Fixed: Blocks checkout field now shows native required indicator (*) when the
   required setting is enabled
 * Improved: Required field validation is now country-aware for both Classic and
   Blocks checkout engines

#### 1.2.1

 * Changed plugin prefix from ksa_nav_ to otoksa_ for WordPress.org compliance (
   minimum 4 characters required)
 * Updated all PHP classes, functions, options, AJAX actions, and JavaScript globals
   to use new prefix
 * Maintains backward compatibility with existing installations using old prefix
 * Order meta display checks both old and new key formats

#### 1.2.0

 * Added “Set Shortaddress Field Required” setting for checkout validation
 * Added External Services documentation for WordPress.org compliance
 * Fixed all prefixing issues for WordPress.org guidelines compliance
 * Improved uninstall cleanup for options and transients
 * Removed unnecessary WooCommerce logger modification

#### 1.1.0

 * feat: Integrate OTO National Address API and enhance validation
 * feat: Add loading spinner and refine client-side validation
 * fix: Clear access token cookie if API key is empty
 * feat: Add CSS for KSA National Address Shortcode styling
 * feat: Swap buildingName and streetName mapping

#### 1.0.0

 * Initial release.

## Meta

 *  Version **1.2.2**
 *  Last updated **8 آی‌لار ago**
 *  Active installations **90+**
 *  WordPress version ** 5.0 or higher **
 *  Tested up to **6.9.11**
 *  PHP version ** 7.2 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/ksa-national-address-validator/)
 * Tags
 * [address](https://azb.wordpress.org/plugins/tags/address/)[checkout](https://azb.wordpress.org/plugins/tags/checkout/)
   [Saudi Arabia](https://azb.wordpress.org/plugins/tags/saudi-arabia/)[validation](https://azb.wordpress.org/plugins/tags/validation/)
   [woocommerce](https://azb.wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://azb.wordpress.org/plugins/ksa-national-address-validator/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/ksa-national-address-validator/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/ksa-national-address-validator/reviews/)

## Contributors

 *   [ otoglobal ](https://profiles.wordpress.org/otoglobal/)
 *   [ hammadoto ](https://profiles.wordpress.org/hammadoto/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/ksa-national-address-validator/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://tryoto.com/)