The Gilmore shop was producing 404 errors on the main shop page
under certain conditions. Traced this to an in_array() call where
the second parameter was not an array at the time. Added a test to
make sure the parameter was an array before that function call and
that cleared the problem.
& $excludeCats array below.
*/
$excludeCats = array(
- 'souvenir'
+ 'souvenir'
);
-if ( is_shop() && in_array( $category->slug, $excludeCats ) ) {
- return;
+if ( is_shop() && is_array($excludeCats) && in_array( $category->slug, $excludeCats ) ) {
+ return;
}