How to exclude _load_textdomain_just_in_time alert in your debug.log file in WordPress

set_error_handler(function($errno, $errstr, $errfile, $errline) {
  // Search if the message contains "_load_textdomain_just_in_time"
  if (strpos($errstr, '_load_textdomain_just_in_time') !== false) {
      return true; // suppress the specific error
  }
  // for all other messages, just act normal.
  return false;
}, E_USER_NOTICE | E_NOTICE);

Add to wp-config.php this code taken from this forum support topic and the file debug.log will no more be flooded by the alert ‘_load_textdomain_just_in_time’

Remove it when the plugins update and there will be no more ‘_load_textdomain_just_in_time’ alert