• We are seeing this error on sites running this plugin (version 1.5.18) and PHP 8.2:
    Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wc-shippo-shipping domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.)
    The error occurs multiple times on front end and admin pages.
    The stack trace is as follows:
    1: …/wp-includes/functions.php -- line 6131
    2: …/wp-includes/functions.php -- line 6071
    3: …/wp-includes/l10n.php -- line 1381
    4: …/wp-includes/l10n.php -- line 1419
    5: …/wp-includes/l10n.php -- line 195
    6: …/wp-includes/l10n.php -- line 307
    7: …/wp-content/plugins/wc-shippo-shipping/wc-shippo-shipping.php -- line 31
    8: …/wp-settings.php -- line 560
    9: …/wp-config.php -- line 168
    10: …/wp-load.php -- line 50
    11: …/wp-admin/admin.php -- line 35
    12: …/wp-admin/plugins.php -- line 10

Viewing 3 replies - 1 through 3 (of 3 total)
  • 1teamsoftwaresupport1

    (@1teamsoftwaresupport1)

    We are sorry for the troubles, it is something new that WordPress forces when translation function is used a bit early. The easiest way to quickly resolve is to disable WP_DEBUG and notices will disappear.

    Thread Starter Eileen Mack

    (@mowsteadily)

    Hi,
    I understand the cause of the issue, however this change was introduced with WP 6.7 in November 2024, so it’s not really new any more. We rely on WP_DEBUG on staging sites to be able to track actual emergent errors / deprecations and to have one plugin flooding the logs with this error is a pain.
    The real solution is generally to make sure that any calls to translation related functions are attached to hooks that fire after translation is ready.
    In the case of your plugin the source of the error isn’t buried very deep – on line 31 of plugins/wc-shippo-shipping/wc-shippo-shipping.php in your Plugin->register() call, (basically the first thing your plugin does) you’re calling __() which needs translation to be available. Because you’re not attaching this to a hook, it’s basically running around the plugins_loaded hook, before textdomain is loaded. You should hook that whole Plugin->register() call to init, or alternatively don’t try to use __() there.

    1teamsoftwaresupport1

    (@1teamsoftwaresupport1)

    Thanks for your feedback. We added a task to backlog to resolve it in the free version of the plugin. PRO version does not have this issue.

    Best Regards!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.