Sage 9 file_get_contents warnings after update WP to 6.3

Thank you for pointing me in the right direction! Using the filter in get_file_path, we can manually override the function’s return value to tell WP we don’t have a theme.json file. Adding this in filters.php did the trick for me:

add_filter('theme_file_path', function($path, $file) {
    if($file === 'theme.json') {
        return false;
    }
    return $path;
}, 0, 2);
12 Likes