Public API Transport

Public API Transport controls how WP Geo Controller sends public geolocation requests. You can use the existing Legacy AJAX method or switch to the native WordPress REST API.

Changing the transport method does not change the plugin’s geolocation logic, returned data, shortcodes, caching, security rules or SEO redirections.

Legacy AJAX

Legacy AJAX is the default transport method and preserves compatibility with existing installations.

It uses the traditional WordPress AJAX system to process public API requests. Choose this option if your website already works correctly or if another plugin, firewall or server configuration restricts access to the WordPress REST API.

This mode is recommended when:

  • You are upgrading an existing installation.
  • You want to preserve the current request flow.
  • Your server or security plugin blocks REST API requests.
  • You need maximum backward compatibility.

WordPress REST API

WordPress REST API mode uses the native WordPress REST infrastructure to process public geolocation requests.

The following endpoints are available:

/wp-json/cf-geoplugin/v1/authenticate
/wp-json/cf-geoplugin/v1/lookup

This mode is recommended for new integrations and websites that already use the WordPress REST API.

Choose this option when:

  • You want to use standard WordPress REST endpoints.
  • Your integration communicates with WordPress through REST requests.
  • Your caching, firewall and security configuration allows access to the REST API.
  • You are developing a new frontend or external integration.

Switching Transport Modes

You can change the transport mode from the plugin settings under Public API Transport.

The change is optional and reversible. If the WordPress REST API is unavailable or blocked, switch back to Legacy AJAX.

After changing the transport mode, clear the website, browser, CDN and object caches, then verify that public geolocation requests are working correctly.

Compatibility

Both transport modes use the same internal geolocation processing and return equivalent results. The selected option changes only how public requests reach the plugin.

Existing websites can continue using Legacy AJAX without modifying their integrations. WordPress REST API mode can be enabled when the website and server environment are ready for it.

Was this page helpful?