If for any reason you want to hide all product prices for specific countries like the United States, it’s likely you’ll have to use some kind of strange PHP snippet. And we know how boring that can be and somewhat difficult it can be, especially if we know nothing about programming.
That’s why we want to show you how to hide products based on the country.
For this, we’ll use the Country Catalogs for WooCommerce plugin. It helps you apply restrictions to your products, categories, variations, etc. to hide them from selected countries.
Once installed and activated, you need to open the plugin by going to WooCommerce > Country Catalogs for WooCommerce.
OPTION 1: Hide product prices GLOBALLY
Once opened, you’ll find the plugin’s home page, which contains the options you have to apply restrictions to your products. Therefore, you need to select the Open global settings option.
Hide product prices for specific countries
You can easily hide prices by country. For example, you can hide your product prices for the United States.
For this, you need to set these values in the plugin:
- Geolocation Method: Select any of the options
- Fallback geolocation method: IP (Automatic)
- What happens when the country is unknown: Show all products
- Restriction method: Show product in catalog, disable add to cart, hide prices
- Select country: United States (US). Or any country you need to restrict.
- Sell in selected countries: No
- Click on Save changes
With this, you’ll hide the product prices for users from the United States. They won’t be able to neither see prices nor add them to the cart.
OPTION 2: Hide product prices for INDIVIDUAL products
To hide product prices individually from specific countries, you need to follow these really simple steps.
a) Open the product you want to edit
You do this by going to Products in WooCommerce and opening the product whose price you want to hide in a specific product.
As you can see, we have an orange T-shirt among a lot of blue ones, so it shouldn’t be hard to notice when the product price hides from the store.
b) Edit the product usage restrictions
Once you open the product, you need to go to the Country Restrictions section and select the country or countries where you want to hide that specific product price.
In Available in selected countries you need to select No. Then, just click on Update to save changes.
Now, if you visit your store, you’ll notice that the product price will appear in all other countries, except in the one you selected.
For example, we’ve hidden our product price just for El Salvador, so visitors from the US should not have any problems visualizing the price of this product.
On the other hand, customers from El Salvador won’t be able to see the product price.
It’s really simple.