Skip to content

PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. #803

@DeBAAT

Description

@DeBAAT

🐞 bug report

Behavior:

  • What is the issue? (*)
    Running my plugin generates a PHP Notice when WP_DEBUG is true. The full notice reads "PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-media-category-management 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.)".

It seems to be cause by the code on line 3464 of class-freemius.php:
add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );

  • What is the expected behavior?
    No PHP Notice.

Versions: (*)

  • Freemius SDK Version: 2.12.0 (on dev site, live site runs on 2.11.0)
  • WordPress Version: 6.8.1
  • PHP Version: 8.3

Plugin / Theme: (*)

  • Name: WP Media Category Management
  • Slug: wp-media-category-management
  • Freemius ID: 10419

Additional Information:

  • Browser Type: (*) FireFox
  • Browser Version: (*) 138.0.4
  • OS: (*) Windows 11
  • Stack Traces:

Note: (*) indicates required information. Without this information, your issue may be auto-closed.

You can find your Freemius SDK version at /freemius/start.php

You can find your Freemius product ID in the Freemius dashboard: SETTINGS -> INTEGRATION.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions