Check product var is set
This commit is contained in:
parent
08bfd6b4d7
commit
004e556e18
|
@ -22,7 +22,7 @@ if ( empty( $woocommerce_loop['columns'] ) )
|
||||||
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
|
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
|
||||||
|
|
||||||
// Ensure visibility
|
// Ensure visibility
|
||||||
if ( ! $product->is_visible() )
|
if ( ! $product || ! $product->is_visible() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Increase loop count
|
// Increase loop count
|
||||||
|
|
Loading…
Reference in New Issue