Reply To: Fatal error: Call for undefined function is_shop()

Homepage Forums Minimal Grid Fatal error: Call for undefined function is_shop() Reply To: Fatal error: Call for undefined function is_shop()

#2762

Ramchilla
Participant

I had the same exact problem and I was able to fix it by changing that line in the file to this:

} elseif ( function_exists('is_shop') && is_shop() && $shop_id = wc_get_page_id( 'shop' ) ) {
      $title = get_the_title( $shop_id );
 }

is_shop() is a WooCommerce function, so if you don’t have Woocommerce, the line will fail. I fixed mine by first checking if the function even exists, but you can solve it other ways.

Hope that helps.