KSA National Address Validator

વર્ણન

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.
  • Validates the format of the short code (4 letters, 4 digits).
  • Fetches address details from the OTO API.
  • Automatically fills in the checkout address fields.
  • Caches the API access token to improve performance.
  • Includes a settings page to configure the API key.

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.

સ્થાપન

  1. Upload the ksa-national-address-validator folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to Settings -> KSA Validator and enter your OTO API Key.

એફએક્યુ (FAQ)

Where do I get an OTO API Key?

You can obtain an API key by signing up for an OTO account.

સમીક્ષાઓ

આ પ્લગઇન માટે કોઈ સમીક્ષાઓ નથી.

ફાળો આપનાર & ડેવલપર્સ

આ ઓપન સોર્સ સોફ્ટવેર છે. નીચેના લોકો એ આ પ્લગિન માટે ફાળો આપ્યો છે.

ફાળો આપનારા

ચેન્જલૉગ

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.