| @@ 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 ); |
|
| @@ 687-697 (lines=11) @@ | ||
| 684 | $scanned_files = WC_Admin_Status::scan_template_files( $template_path ); |
|
| 685 | ||
| 686 | foreach ( $scanned_files as $file ) { |
|
| 687 | if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { |
|
| 688 | $theme_file = get_stylesheet_directory() . '/' . $file; |
|
| 689 | } elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) { |
|
| 690 | $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file; |
|
| 691 | } elseif ( file_exists( get_template_directory() . '/' . $file ) ) { |
|
| 692 | $theme_file = get_template_directory() . '/' . $file; |
|
| 693 | } elseif( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) { |
|
| 694 | $theme_file = get_template_directory() . '/woocommerce/' . $file; |
|
| 695 | } else { |
|
| 696 | $theme_file = false; |
|
| 697 | } |
|
| 698 | ||
| 699 | if ( ! empty( $theme_file ) ) { |
|
| 700 | $core_version = WC_Admin_Status::get_file_version( $template_path . $file ); |
|
| @@ 159-167 (lines=9) @@ | ||
| 156 | foreach ( $core_templates as $file ) { |
|
| 157 | ||
| 158 | $theme_file = false; |
|
| 159 | if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { |
|
| 160 | $theme_file = get_stylesheet_directory() . '/' . $file; |
|
| 161 | } elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) { |
|
| 162 | $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file; |
|
| 163 | } elseif ( file_exists( get_template_directory() . '/' . $file ) ) { |
|
| 164 | $theme_file = get_template_directory() . '/' . $file; |
|
| 165 | } elseif( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) { |
|
| 166 | $theme_file = get_template_directory() . '/woocommerce/' . $file; |
|
| 167 | } |
|
| 168 | ||
| 169 | if ( $theme_file !== false ) { |
|
| 170 | $core_version = WC_Admin_Status::get_file_version( WC()->plugin_path() . '/templates/' . $file ); |
|