From d84ffb141d76b15fff446f53cc7cc1f8939c7bec Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Sat, 8 Oct 2011 12:14:02 +0100 Subject: [PATCH] Subcategory display fix --- readme.txt | 1 + woocommerce_template_functions.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index a5a60451421..b9d11c677a3 100644 --- a/readme.txt +++ b/readme.txt @@ -64,6 +64,7 @@ For further documentation on using WooCommerce, please sign up for free at http: * Added option to show sub-categories when browing categories/the shop page * Zero tax rate fix * Filters for tax rates +* Fixes to find rate function = 1.0.3 - 06/10/2011 = * Several minor fixes/tweaks diff --git a/woocommerce_template_functions.php b/woocommerce_template_functions.php index 60b7584a29a..bd6b4a87aad 100644 --- a/woocommerce_template_functions.php +++ b/woocommerce_template_functions.php @@ -1072,10 +1072,11 @@ function woocommerce_demo_store() { * display product sub categories as thumbnails **/ function woocommerce_product_subcategories() { - global $woocommerce, $columns, $loop, $wp_query; + global $woocommerce, $columns, $loop, $wp_query, $wp_the_query; + + if ($wp_query !== $wp_the_query) return; // Detect main query if (!is_product_category() && !is_shop()) return; - if (is_product_category() && get_option('woocommerce_show_subcategories')=='no') return; if (is_shop() && get_option('woocommerce_shop_show_subcategories')=='no') return;