PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the podlove-podcasting-plugin-for-wordpress 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.)
We do indeed call load_plugin_textdomain before init. However, the notice stays even if I remove the line completely. (in fact we don't need to call this at all any more since we don't use local translation files)
Digging deeper, it seems calling any translation function before init causes this issue. For example lib/jobs/tools_section.php:9. I can't tell how many instances of this issue we might have because only the first call causes the notice. There's no way around fixing them one by one.
Suggested Approach
turn on xdebug, which enables stack traces
load a WordPress page (frontend, admin, podlove settings, ...)
see if the notice appears
then inspect the stack trace to find the function call (look for __( or the domain podlove-podcasting-plugin-for-wordpress)
find a way to run this piece of code on or after init
Since WordPress 6.7.0 this notice appears:
We do indeed call
load_plugin_textdomain
beforeinit
. However, the notice stays even if I remove the line completely. (in fact we don't need to call this at all any more since we don't use local translation files)Digging deeper, it seems calling any translation function before
init
causes this issue. For examplelib/jobs/tools_section.php:9
. I can't tell how many instances of this issue we might have because only the first call causes the notice. There's no way around fixing them one by one.Suggested Approach
__(
or the domainpodlove-podcasting-plugin-for-wordpress
)