From 6a36bce334dcb6d9455d6db6f48a286d71ac0a43 Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Mon, 21 Sep 2020 14:12:22 -0300 Subject: [PATCH] tweak logic to use `woocommerce/*-*` templates in theme folder --- includes/class-wc-template-loader.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/class-wc-template-loader.php b/includes/class-wc-template-loader.php index 05d43f86bfa..4ba345a8c90 100644 --- a/includes/class-wc-template-loader.php +++ b/includes/class-wc-template-loader.php @@ -158,10 +158,8 @@ class WC_Template_Loader { if ( is_tax( 'product_cat' ) || is_tax( 'product_tag' ) ) { $cs_taxonomy = str_replace( '_', '-', $object->taxonomy ); $cs_default = str_replace( '_', '-', $default_file ); - $templates[] = 'taxonomy-' . $cs_taxonomy . '-' . $object->slug . '.php'; $templates[] = 'taxonomy-' . $object->taxonomy . '-' . $object->slug . '.php'; $templates[] = WC()->template_path() . 'taxonomy-' . $cs_taxonomy . '-' . $object->slug . '.php'; - $templates[] = 'taxonomy-' . $cs_taxonomy . '.php'; $templates[] = 'taxonomy-' . $object->taxonomy . '.php'; $templates[] = WC()->template_path() . 'taxonomy-' . $cs_taxonomy . '.php'; $templates[] = $cs_default; @@ -176,9 +174,8 @@ class WC_Template_Loader { $templates[] = $default_file; if ( isset( $cs_default ) ) { $templates[] = WC()->template_path() . $cs_default; - } else { - $templates[] = WC()->template_path() . $default_file; } + $templates[] = WC()->template_path() . $default_file; return array_unique( $templates ); }