From 31b6291b8559733706ab5a584bb5a49b36bfa599 Mon Sep 17 00:00:00 2001 From: abaicus Date: Fri, 26 Jul 2024 15:12:59 +0300 Subject: [PATCH] chore: make sure that translation json file doesn't exist before attempting to load from `/themes` --- inc/core/front_end.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/core/front_end.php b/inc/core/front_end.php index 3dc3844980..ef86ee1d4a 100644 --- a/inc/core/front_end.php +++ b/inc/core/front_end.php @@ -588,6 +588,10 @@ public function fix_script_translation_files( $file, $handle, $domain ) { return $file; } + if ( is_file( $file ) ) { + return $file; + } + if ( strpos( $file, WP_LANG_DIR . '/plugins' ) !== false ) { $file = str_replace( WP_LANG_DIR . '/plugins', WP_LANG_DIR . '/themes', $file ); }