Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

v2 endpoints require modified locale key #78

@ghost

Description

Expected behavior

As per p77Llu-byF-p2, v2 endpoints must pass _locale rather than locale. Prior versions should still use locale.

From the perspective of semantic versioning, implementing this may be a breaking change.

Actual behavior

In the default case where appendsPreferredLanguageLocale is true, a localization identifier is added to requests with a key of locale. This needs to change based on the endpoint version.

Steps to reproduce the behavior

Inspect a request constructed via WordPressKit and scrutinize the query string. Note the value locale is used for all endpoint versions.

WordPressKit Environment

All devices & versions of WordPressKit, Xcode & iOS.

  • WordPressKit Version [e.g. 22] : all versions
  • OS: [e.g. iOS 12.1.3 (16D40)] : all versions
  • Device: [e.g. iPhone XS] : all devices
  • Xcode Version: [e.g. Xcode 10.1 (10B61)] : all versions
Additional Context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions