@@ 372-382 (lines=11) @@ | ||
369 | ||
370 | foreach ( $scanned_files as $plugin_name => $files ) { |
|
371 | foreach ( $files as $file ) { |
|
372 | if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { |
|
373 | $theme_file = get_stylesheet_directory() . '/' . $file; |
|
374 | } elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) { |
|
375 | $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file; |
|
376 | } elseif ( file_exists( get_template_directory() . '/' . $file ) ) { |
|
377 | $theme_file = get_template_directory() . '/' . $file; |
|
378 | } elseif( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) { |
|
379 | $theme_file = get_template_directory() . '/woocommerce/' . $file; |
|
380 | } else { |
|
381 | $theme_file = false; |
|
382 | } |
|
383 | ||
384 | if ( $theme_file !== false ) { |
|
385 | $override_data[] = basename( $theme_file ); |
@@ 723-733 (lines=11) @@ | ||
720 | $scanned_files = WC_Admin_Status::scan_template_files( $template_path ); |
|
721 | ||
722 | foreach ( $scanned_files as $file ) { |
|
723 | if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { |
|
724 | $theme_file = get_stylesheet_directory() . '/' . $file; |
|
725 | } elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) { |
|
726 | $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file; |
|
727 | } elseif ( file_exists( get_template_directory() . '/' . $file ) ) { |
|
728 | $theme_file = get_template_directory() . '/' . $file; |
|
729 | } elseif( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) { |
|
730 | $theme_file = get_template_directory() . '/woocommerce/' . $file; |
|
731 | } else { |
|
732 | $theme_file = false; |
|
733 | } |
|
734 | ||
735 | if ( ! empty( $theme_file ) ) { |
|
736 | $core_version = WC_Admin_Status::get_file_version( $template_path . $file ); |
@@ 199-207 (lines=9) @@ | ||
196 | foreach ( $core_templates as $file ) { |
|
197 | ||
198 | $theme_file = false; |
|
199 | if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { |
|
200 | $theme_file = get_stylesheet_directory() . '/' . $file; |
|
201 | } elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) { |
|
202 | $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file; |
|
203 | } elseif ( file_exists( get_template_directory() . '/' . $file ) ) { |
|
204 | $theme_file = get_template_directory() . '/' . $file; |
|
205 | } elseif( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) { |
|
206 | $theme_file = get_template_directory() . '/woocommerce/' . $file; |
|
207 | } |
|
208 | ||
209 | if ( $theme_file !== false ) { |
|
210 | $core_version = WC_Admin_Status::get_file_version( WC()->plugin_path() . '/templates/' . $file ); |