WooCommerce – Hide Product Reviews by Zip Code

In this tutorial, we will show you how to hide product reviews by zip code in WooCommerce. You will be able to hide or show product reviews for specific zip codes with a few simple steps.

We’ll do it using the WooCommerce Product Restrictions by Zip Code plugin, which allows you to apply location restrictions for all products, individual products, entire categories, specific variations, and discount coupons.

You can restrict your WooCommerce content by city, state, province, zip code, store location, or using custom locations.

Once you install and activate the plugin, follow these steps to hide WooCommerce product reviews by zip code.

Step 1. Set up the zip code restriction method

The first thing we need to do is to set up the zip code restriction method; we want our products to be restricted based on the customer’s zip code.

Go to WooCommerce > Settings > Restrictions by location.

Once there, select the following values to set up the zip code restriction method:

  • I want to restrict: We will apply this restriction to Products and variations.
  • I want to restrict by: Zip code
  • What happens when the user location is unknown: We will show all the products, but you may want to hide them.
  • Hit Save changes.

woocommerce hide product reviews by zip code

2- Set up the hide product reviews condition

After selecting what content we are going to hide and under what type of restriction we are going to do it, we need to go to the “Products per location” tab and select the following values to set that only product reviews will be hidden when customers enter a blocked zip code.

  • Sell in selected locations: No
  • Tick the Hide product reviews checkbox.
  • Click on Save changes.

Note – Customers will be able to buy the products, they will see the prices, the add to cart button, the product description, etc. The only thing that will be hidden will be the product reviews.

woocommerce hide product reviews by zip code

3- Hide WooCommerce product reviews by zip code

Now it’s time to hide WooCommerce product reviews by zip code.

  1. Open the products you want to edit
  2. Select the following values in Product Data:
    • Zip codes: Here you need to enter the zip codes for which the product reviews will be hidden. Separate them by commas.
    • Available in selected locations: No

Note – As explained above, the products will be visible in the store and users will be able to add them to the cart and purchase them. Only the reviews will be hidden from the product pages.

woocommerce hide product reviews by zip code

Once you apply the changes, you can visit the store as a normal customer. The plugin will display a popup asking you to enter your zip code.

woocommerce hide product reviews by zip code

When the customer enters a zip code that should not see product reviews, this is what the product page will look like.

woocommerce hide product reviews by zip code

However, if he enters a zip code that is not restricted, the customer will see the product reviews without any problems.

woocommerce hide product reviews by zip code

WooCommerce Product Restrictions by Zip Code simplifies the task of hiding product reviews by zip code. You can apply restrictions by zip code, city, state, province, store location, etc.