Skip to content

Remove the per-endpoint locale parameter from WordPress.com requests - #1597

Merged
oguzkocer merged 2 commits into
trunkfrom
remove/wpcom-endpoint-locale-params
Aug 27, 2026
Merged

Remove the per-endpoint locale parameter from WordPress.com requests#1597
oguzkocer merged 2 commits into
trunkfrom
remove/wpcom-endpoint-locale-params

Conversation

@oguzkocer

@oguzkocer oguzkocer commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to #1590.

Now that every WordPress.com request carries a locale from the client's WpComLanguageProvider, the endpoints that declared their own locale parameter no longer need one — and left in place they'd put the pair on the URL twice.

Changes

  • Dropped the locale field and its query pair from ProductsParams, SitePlansParams and the Stats*Params types.
  • StatsSummaryParams, StatsInsightsParams and LanguagesGetParams carried nothing else, so they're removed entirely. get_stats_summary, get_stats_insights and the languages get now take one fewer argument.
  • Removed the unit and e2e tests that only covered the removed field.

Changelog

  • I've added an entry to CHANGELOG.md under ## [Unreleased], using the Keep a Changelog categories (Added, Changed, Deprecated, Removed, Fixed, Security). Prefix breaking changes with **BREAKING:**.

@wpmobilebot

wpmobilebot commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

XCFramework Build

This PR's XCFramework is available for testing. Add to your Package.swift:

.package(url: "https://github.com/automattic/wordpress-rs", branch: "pr-build/1597")

Built from 97ea235

Base automatically changed from add/wpcom-locale-parameter to trunk August 26, 2026 03:05
@oguzkocer
oguzkocer force-pushed the remove/wpcom-endpoint-locale-params branch from 552bd62 to b379528 Compare August 26, 2026 03:05
Changes:
- Drop the `locale` field and its query pair from `ProductsParams`,
  `SitePlansParams` and the `Stats*Params` types
- Remove `StatsSummaryParams`, `StatsInsightsParams` and `LanguagesGetParams`,
  which carried nothing else, and drop `params` from their endpoints
- Remove the unit and e2e tests that only covered the removed field
@oguzkocer
oguzkocer force-pushed the remove/wpcom-endpoint-locale-params branch from b379528 to 340bee2 Compare August 26, 2026 03:10
`Exports.swift` re-exported the type, which no longer exists, so every
Swift target failed to build.
@oguzkocer
oguzkocer marked this pull request as ready for review August 26, 2026 05:20
@oguzkocer
oguzkocer merged commit ada0576 into trunk Aug 27, 2026
36 checks passed
@oguzkocer
oguzkocer deleted the remove/wpcom-endpoint-locale-params branch August 27, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants