Expire theme cache in case a theme is updated outside WordPress

If someone updates their theme outside of the WordPress update process
(by manipulating files directly) the cache won't be invalidated. To deal
with that, we're setting the TTL here to 1hr.
This commit is contained in:
Josh Betz 2022-05-03 10:45:07 -05:00
parent 5dc5b467a8
commit 43579aeac9
1 changed files with 1 additions and 1 deletions

View File

@ -1171,7 +1171,7 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
);
$theme_info = array_merge( $active_theme_info, $parent_theme_info );
set_transient( 'wc_system_status_theme_info', $theme_info );
set_transient( 'wc_system_status_theme_info', $theme_info, HOUR_IN_SECONDS );
}
return $theme_info;