Merge pull request #9244 from franticpsyx/template_override_check_path
[2.4] System Report: Template version check path incorrect
This commit is contained in:
commit
948ba904de
|
@ -661,11 +661,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
$outdated_templates = false;
|
||||
|
||||
foreach ( $template_paths as $plugin_name => $template_path ) {
|
||||
$scanned_files[ $plugin_name ] = WC_Admin_Status::scan_template_files( $template_path );
|
||||
}
|
||||
|
||||
foreach ( $scanned_files as $plugin_name => $files ) {
|
||||
foreach ( $files as $file ) {
|
||||
$scanned_files = WC_Admin_Status::scan_template_files( $template_path );
|
||||
|
||||
foreach ( $scanned_files as $file ) {
|
||||
if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
|
||||
$theme_file = get_stylesheet_directory() . '/' . $file;
|
||||
} elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) {
|
||||
|
@ -679,7 +678,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
}
|
||||
|
||||
if ( ! empty( $theme_file ) ) {
|
||||
$core_version = WC_Admin_Status::get_file_version( WC()->plugin_path() . '/templates/' . $file );
|
||||
$core_version = WC_Admin_Status::get_file_version( $template_path . $file );
|
||||
$theme_version = WC_Admin_Status::get_file_version( $theme_file );
|
||||
|
||||
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
|
||||
|
|
Loading…
Reference in New Issue