• I turned on the debug log for a different issue and it quickly filled up with this warning. I am on a multisite where a couple sites are using Social Warfare. I have not been able to debug it by swapping a theme (Kadence) and removing other plugins.

    [21-Mar-2025 14:27:28 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the social-warfare 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.) in /var/www/vhosts/the****com/httpsdocs/wp-includes/functions.php on line 6114

Viewing 2 replies - 1 through 2 (of 2 total)
  • Patch for the above issue

    diff --git a/lib/Social_Warfare.php b/lib/Social_Warfare.php
    index f4bbdec..66ec892 100644
    --- a/lib/Social_Warfare.php
    +++ b/lib/Social_Warfare.php
    @@ -51,7 +51,9 @@ class Social_Warfare {
    $this->load_classes();

    // Instantiate all the core classes
    + add_action('init', function() {
    $this->instantiate_classes();
    + });

    // Instantiate the admin-only classes.
    if ( true === is_admin() ) {
    PTaubman

    (@ptaubman)

    Greetings – Is there an idea of when this will be implemented into the code of the plugin, rather than having to update it on several slites?

    Thanks so much!
    Paul.

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

The topic ‘Getting a PHP Notice with latest release’ is closed to new replies.