Skip to content

Jetpack CRM: Translations loaded too early #43141

@swissspidy

Description

@swissspidy

Impacted plugin

CRM

Quick summary

  1. Main plugin file calls ZeroBSCRM::instance() immediately, without waiting for init or similar hook
  2. ZeroBSCRM::__construct() calls ZeroBSCRM::includes()
  3. That method includes ZeroBSCRM.Config.Init.php which calls __()`

In short, __() is called too early without waiting for init or similar. That's the prime example from the https://make.wordpress.org/core/2024/10/21/i18n-improvements-6-7/ post. This message means there are some __() calls in the plugin that won't ever work, which the developer should fix.

While this doing_it_wrong message was already introduced in 6.7, there were some edge cases where it didn't fire. In 6.8 that's not the case anymore. See https://make.wordpress.org/core/2025/03/12/i18n-improvements-6-8/

Steps to reproduce

  1. Update to WP 6.8
  2. Optionally change the site locale or user locale to e.g. de_DE
  3. Activate Jetpack CRM
  4. See doing_it_wrong message

Site owner impact

More than 60% of the total website/platform users

Severity

Minor

What other impact(s) does this issue have?

No response

If a workaround is available, please outline it here.

No response

Platform (Simple and/or Atomic)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions