Functions when woocommerce isn’t installed

If you define your own empty function, then it can cause a problem when the plugin tries to load its same function. The simplest way around this is to use PHP’s built-in function_exists() method wrapped around the function call. If that function is defined (like inside the plugin) it’ll run the call. If not, it’s skips over it without a second thought.

if ( function_exists( 'is_shop' ) ) {
    is_shop();
    // do other stuff related to is_shop()
}