Check product var is set

This commit is contained in:
Mike Jolley 2013-10-16 10:52:35 +01:00
parent 08bfd6b4d7
commit 004e556e18
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ if ( empty( $woocommerce_loop['columns'] ) )
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
// Ensure visibility
if ( ! $product->is_visible() )
if ( ! $product || ! $product->is_visible() )
return;
// Increase loop count