Skip to content

Instantly share code, notes, and snippets.

@kowsar89
Created November 19, 2024 09:12
Show Gist options
  • Select an option

  • Save kowsar89/ed30f2b7abc5d4784ba4b05503c70fe0 to your computer and use it in GitHub Desktop.

Select an option

Save kowsar89/ed30f2b7abc5d4784ba4b05503c70fe0 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Disable Textdomain Error
* Description: Prevents triggering errors for the '_load_textdomain_just_in_time' function.
* Author: Kowsar Hossain
* Version: 1.0
*
* Note: This is a Must-Use (MU) plugin. Place this file in the 'wp-content/mu-plugins' directory.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
add_filter( 'doing_it_wrong_trigger_error', function( $status, $function_name ) {
if ( '_load_textdomain_just_in_time' === $function_name ) {
return false;
}
return $status;
}, 10, 2 );
@RoundAboutWEB
Copy link

It works fine, thanks

@lawebec
Copy link

lawebec commented May 6, 2025

Works perfectly, Thank you very much

@umeshgame
Copy link

thank, it works

@aqres
Copy link

aqres commented May 12, 2025

Thanks for this, very helpful in the meantime for me (whatever "meantime" turns out to mean).

@LukaszJaro
Copy link

WordPress also released steps to perform backtrace to find root cause of the issue https://make.wordpress.org/core/2024/10/21/i18n-improvements-6-7/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment