From b138579de88c0f28a4428d299ffa84e19300b7b3 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 27 Oct 2016 11:42:26 -0400 Subject: [PATCH] Fixing problem with going to shop home - returns 404 error due to invalid function parameter in content-product_cat.php Added is_array test for second parameter of in_array() on line 27 Updated version in style.css --- style.css | 2 +- woocommerce/content-product_cat.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/style.css b/style.css index 9b91883..6af6017 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: Gilmore Car Museum Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme created for Gilmore Car Museum. -Version: 1.2.27 +Version: 1.2.30 */ diff --git a/woocommerce/content-product_cat.php b/woocommerce/content-product_cat.php index dc2a847..ceaf439 100644 --- a/woocommerce/content-product_cat.php +++ b/woocommerce/content-product_cat.php @@ -24,7 +24,7 @@ global $woocommerce_loop; //$excludeCats = array( // 'souvenir' //); -if ( is_shop() && in_array( $category->slug, $excludeCats ) ) { +if ( is_shop() && is_array($excludeCats) && in_array( $category->slug, $excludeCats ) ) { return; } -- 2.17.1