title: Restrict access to WooCommerce products by country
body: <p>I need Restrict access to WooCommerce products by country  and use this code:</p>
  <pre><code>add_filter( 'woocommerce_product_is_visible', 'bbloomer_hide_product_if_country', 9999, 2 );
   
  function bbloomer_hide_product_if_country( $visible, $product_id ){
     $location = WC_Geolocation::geolocate_ip();
     $country = $location['country'];
     if ( $country === &quot;US&quot; ) {
        $visible = false;
     }
     else { 
        $visible = true;
     }
     return $visible;
  }
  </code></pre>
  <p>but have a problem And that is Google can not index this product.
  How can I exclude Google bot?
  please help to me</p>