Skip to content

Fix native Directorist localization textdomains - #2944

Open
Arafat-plugins wants to merge 1 commit into
sovware:developmentfrom
Arafat-plugins:fix/native-textdomain-issues
Open

Fix native Directorist localization textdomains#2944
Arafat-plugins wants to merge 1 commit into
sovware:developmentfrom
Arafat-plugins:fix/native-textdomain-issues

Conversation

@Arafat-plugins

@Arafat-plugins Arafat-plugins commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

How to reproduce the issue or how to test the changes

This fixes Directorist native localization issues where multiple visible strings were not using Directorist's own directorist text domain, and the React admin order bundle did not have script translations registered.

Why this needed fixing:

  • Some checkout, order, payment, refund, dashboard, and admin labels were translated with the wrong domain or left outside the native Directorist translation catalog.
  • Because of that, WordPress/WPML could not reliably find those strings under the directorist domain.
  • The Directorist admin order screen is React-based, so PHP textdomain fixes alone are not enough; the built order script also needs wp_set_script_translations() registration for the directorist domain.

What changed:

  • Corrected affected PHP localization calls to use the native directorist text domain.
  • Corrected affected admin order React strings to use the same Directorist domain.
  • Registered script translations for the Directorist admin order bundle.
  • Kept the change limited to localization/textdomain handling; no business logic, query behavior, checkout calculation, payment flow, or data-fetching behavior was changed.

How to test:

  1. Activate Directorist on a WordPress site with a non-English locale or WPML target language.
  2. Go to WPML -> String Translation or use normal WordPress language files and filter/search under the directorist domain.
  3. Confirm affected checkout/order/payment/refund/dashboard/admin strings appear under directorist and can be translated from that domain.
  4. Open Directorist -> Orders and verify React order-screen labels can load translated script strings.
  5. Check checkout/order/refund related frontend/admin messages and confirm the source strings still render normally in English when no translation exists.
  6. Confirm payment/order/refund behavior is unchanged because this PR only changes translation wrappers and script translation registration.

Validation run:

  • PHP syntax lint on changed PHP files from origin/fix/native-textdomain-issues.
  • git diff --check upstream/development..origin/fix/native-textdomain-issues.

Any linked issues

N/A

Screenshot

N/A - localization/textdomain fix. No UI layout change.

Checklist

  • My code follows the WordPress coding standards
  • User-facing native Directorist strings use the directorist text domain.
  • React admin order script translations are registered for the directorist domain.
  • No runtime-heavy logic, new queries, or database writes were added.

@Arafat-plugins
Arafat-plugins force-pushed the fix/native-textdomain-issues branch from 7fd3584 to 2127b09 Compare July 30, 2026 09:11
@Arafat-plugins Arafat-plugins changed the title Fix native Directorist textdomain issues Fix native Directorist localization textdomains Jul 30, 2026
@Armanul46 Armanul46 added this to the v8.9.3 milestone Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants