scan_template_files( WC()->plugin_path() . '/templates' ); $outdated = false; foreach ( $core_templates as $file ) { $theme_file = false; if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { $theme_file = get_stylesheet_directory() . '/' . $file; } elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) { $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file; } elseif ( file_exists( get_template_directory() . '/' . $file ) ) { $theme_file = get_template_directory() . '/' . $file; } elseif( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) { $theme_file = get_template_directory() . '/woocommerce/' . $file; } if ( $theme_file ) { $core_version = $status->get_file_version( WC()->plugin_path() . '/templates/' . $file ); $theme_version = $status->get_file_version( $theme_file ); if ( $core_version && $theme_version && version_compare( $theme_version, $core_version, '<' ) ) { $outdated = true; break; } } } if ( $outdated ) { include( 'views/html-notice-template-check.php' ); } } } endif; return new WC_Admin_Notices();