From 6b6c856cc73c5f0e390c8ed9458defda7a2cd959 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 26 Aug 2016 11:02:57 +0100 Subject: [PATCH] Filter the template path Closes #11774 --- includes/api/class-wc-rest-system-status-controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/api/class-wc-rest-system-status-controller.php b/includes/api/class-wc-rest-system-status-controller.php index 5d9b56a292b..17f610e4b48 100644 --- a/includes/api/class-wc-rest-system-status-controller.php +++ b/includes/api/class-wc-rest-system-status-controller.php @@ -667,12 +667,12 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller { foreach ( $scan_files as $file ) { 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_stylesheet_directory() . '/' . WC()->template_path() . $file ) ) { + $theme_file = get_stylesheet_directory() . '/' . WC()->template_path() . $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; + } elseif ( file_exists( get_template_directory() . '/' . WC()->template_path() . $file ) ) { + $theme_file = get_template_directory() . '/' . WC()->template_path() . $file; } else { $theme_file = false; }