diff --git a/includes/RestApi/Themes/ThemeVariationsController.php b/includes/RestApi/Themes/ThemeVariationsController.php index e74bc0537..72a7ae288 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 ); }