Skip to content

Deprecate useLocalizationMarket and localization.market across surfaces - #4618

Open
SyndicateGit wants to merge 1 commit into
2026-10-rcfrom
river-deprecate-use-localization-market
Open

Deprecate useLocalizationMarket and localization.market across surfaces#4618
SyndicateGit wants to merge 1 commit into
2026-10-rcfrom
river-deprecate-use-localization-market

Conversation

@SyndicateGit

@SyndicateGit SyndicateGit commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds @deprecated JSDoc tags and > Caution: doc blocks to useLocalizationMarket hook and localization.market property on both checkout and customer-account surfaces. Updates the property descriptions to clarify that in cases where multiple markets match, this returns the most narrowly scoped country region market.

Why: useLocalizationMarket is a one-line wrapper whose body is useSubscription(localization.market). TypeScript does not propagate @deprecated through a wrapper, so someone using the hook gets no warning today while someone using the property does.

The > Caution: block mirrors the pattern used by useTarget, useExtensionApi, useExtensionData, and useDeliveryGroupTarget, since the docs pipeline does not serialize @deprecated for top-level exported hooks.

Companion PR in World: https://github.com/shop/world/pull/988628

Changes

  • checkout/api/standard/standard.ts — updates @deprecated on localization.market and adds > Caution: block; clarifies market scoping description
  • checkout/preact/market.ts — adds @deprecated and > Caution: to useLocalizationMarket; updates description
  • customer-account/api/order-status/order-status.ts — adds @deprecated and > Caution: to localization.market; clarifies market scoping description
  • customer-account/preact/market.ts — adds @deprecated and > Caution: to useLocalizationMarket; updates description
  • Changeset for patch bump of @shopify/ui-extensions

Test plan

  • Verify @deprecated shows strikethrough/warning in IDE when using useLocalizationMarket or localization.market
  • Confirm docs build renders the > Caution: block correctly

🤖 Generated with Claude Code

@github-actions github-actions Bot added the needs-rc-port PR against a stable branch awaiting forward-port to the current RC label Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR targets a stable release branch (2026-07). Once merged, the change typically also needs to be forward-ported to 2026-10-rc so it ships in the next release.

When you open the forward-port PR, include a line like this in its body so the needs-rc-port label gets removed automatically when that PR merges:

Forward-port of #4618

Accepted formats (comma-separated for multiple):

  • #4618
  • GH-4618
  • 4618
  • https://github.com/Shopify/ui-extensions/pull/4618

If a forward-port isn't needed (e.g., the change is stable-only), you can remove the needs-rc-port label manually.

@SyndicateGit
SyndicateGit marked this pull request as draft August 13, 2026 21:14
@SyndicateGit SyndicateGit changed the title Deprecate useLocalizationMarket and localization.market Deprecate useLocalizationMarket and localization.market across surfaces Aug 13, 2026
@SyndicateGit
SyndicateGit marked this pull request as ready for review August 13, 2026 21:46
@SyndicateGit
SyndicateGit force-pushed the river-deprecate-use-localization-market branch 2 times, most recently from 1080d54 to 7a8b7c2 Compare August 13, 2026 22:07
@SyndicateGit
SyndicateGit requested review from a team, cpeddecord, jamesvidler and kumar303 and removed request for a team August 13, 2026 22:22

@kumar303 kumar303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but was it actually deprecated in version 2026-07? Do you need to also (or only) merge it into the 2026-10-rc branch?

@SyndicateGit
SyndicateGit changed the base branch from 2026-07 to 2026-10-rc August 14, 2026 20:08
@SyndicateGit
SyndicateGit force-pushed the river-deprecate-use-localization-market branch from 7a8b7c2 to 737f641 Compare August 14, 2026 20:09
…rfaces

Add `@deprecated` tag and `> Caution:` doc block to the `useLocalizationMarket`
hook and `localization.market` property on both the checkout and customer-account
surfaces. The shopify.dev migration guide already lists these as deprecated, but
the source types had no deprecation annotation (hooks) or were missing the
Caution block needed for docs rendering (property).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SyndicateGit
SyndicateGit force-pushed the river-deprecate-use-localization-market branch from 737f641 to fe9d3de Compare August 14, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rc-port PR against a stable branch awaiting forward-port to the current RC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants