From fc48811330306ae3728172bcf8688238251201aa Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Brito Date: Thu, 5 Dec 2024 13:56:29 +0000 Subject: [PATCH] Update ThemeVariationsController.php Fix Change the path where it should look for the theme-i18.json file for different translations. --- includes/RestApi/Themes/ThemeVariationsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/RestApi/Themes/ThemeVariationsController.php b/includes/RestApi/Themes/ThemeVariationsController.php index e74bc0537..252a52b41 100644 --- a/includes/RestApi/Themes/ThemeVariationsController.php +++ b/includes/RestApi/Themes/ThemeVariationsController.php @@ -135,8 +135,8 @@ public function get_update_diy_global_style_variation_args() { * @return string */ private static function translate( $theme_json, $domain = 'default' ) { - $i18n_schema = wp_json_file_decode( __DIR__ . '/theme-i18n.json' ); - + $path = wp_normalize_path( realpath( ABSPATH . WPINC ) ) . '/theme-i18n.json'; + $i18n_schema = wp_json_file_decode( $path ); return translate_settings_using_i18n_schema( $i18n_schema, $theme_json, $domain ); }