Warning: Invalid argument supplied for foreach
-
Hi. I tried to fix it by myself but after 5 hours on this I understood that I can’t…
I got error on site footer:
Warning: Invalid argument supplied for foreach() in /footer.php on line 91
On home page every thing allright. It appears on woocommerce product…
Please help to fix it…
Here’s lines from footer.php
Line 91 starts: foreach ($terms as $term) {</div><?php $category = get_the_category(); if(function_exists( 'is_woocommerce' ) && is_woocommerce() ){ $terms = get_the_terms( $post->ID, 'product_cat' ); $category=''; foreach ($terms as $term) { $category.= $term->name.', '; //break; if($category==""){ $category=""; } } }
- The topic ‘Warning: Invalid argument supplied for foreach’ is closed to new replies.