WooCommerce Product by Country

WooCommerce Product Visibility by Country

Display WooCommerce products by customers country

Description

WooCommerce Product Visibility by Country module lets you hide certain products in certain countries. That is – when customers from selected countries (detected by customer’s IP) will visit your store, selected products will be removed.

You have three options (set in “WooCommerce > Settings > Booster > Products > Product Visibility by Country”):

  • Hide Visibility – will hide selected products in shop (category/archive) and search results. Please note that product still will be accessible via direct link.
  • Make Non-purchasable – will make selected products non-purchasable (i.e. product can’t be added to the cart).
  • Modify Query – will hide selected products completely (including direct link).

To remove product from selected countries:

  • Enabled the module.
  • Go to selected product edit page and find Booster: Product Visibility by Country meta box.
  • Select (multiple) countries, where you want product to be visible and press Update
  • If you do not select any countries – product will be visible everywhere.

WooCommerce Product by Country - Admin Settings - Product Edit Page

Accessible through:

  • WooCommerce > Settings > Booster > Products > Product by Country

Tested on WooCommerce 4.0.0 and WordPress 5.3.2Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

WooCommerce Booster ModulesWooCommerce by CountryWooCommerce Customer LocationWooCommerce Product Visibility by CountryWooCommerce Products

#comment>

#comment>

#comment>#comment>#comment>

Leave a Reply Click here to cancel reply.

#comment>

Comments

43 Comments

  1. Orcun December 20, 2019 at 10:01 am#comment>

    Hi. I am using a caching plugin. Due to performance concerns I dont want to use geolocation to all pages except checkout and card.

    So, is there a way to remove items from the cart when user choose a billing/shipping country, where this product is restricted?

    Thanks in advance

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ December 22, 2019 at 4:09 pm#comment>

      Hi,

      Could you try enabling “Overwrite by Billing Country” option in module settings?

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  2. #comment>

  3. Zainab Sheikh December 11, 2019 at 1:54 pm#comment>

    Hy dear I have booster plus so I just want to fix the issue on my site when I use VPN to check the visibility of the product in a different country then it shows a blank home page but products still showing on the catalog! so please help me!

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ December 11, 2019 at 1:58 pm#comment>

      Hi Zainab,

      Do you use any caching plugins? If you do, please set “Default Custom Location” in Woocoommerce > Settings > General to “Geolocate (with page caching support)” and clear the browser cache when you use the VPN. Also, please try enabling “Modify query” options.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  4. #comment>

  5. Jason August 27, 2019 at 11:08 am#comment>

    Hi,
    Sorry if we sound confused, we are.

    Take for example, the ‘Visibility Options’ in the ‘Product Visibility by Country’ module:

    Visibility Options
    1. Hide Visibility[ ] Enable
    This will hide selected products in shop and search results. However product still will be accessible via direct link.

    2. Make Non-Purchasable[ ] Enable
    This will make selected products non-purchasable (i.e. product can’t be added to the cart).

    3. Modify Query[ ] Enable
    This will hide selected products completely (including direct link).

    In the Product’s edit page, this module’s meta box lets us SELECT which Country this Product should be VISIBLE in; let’s say, Canada.

    Now, it we go back to the module’s Visibility Options (say, Option 3. Modify Query), ENABLING it will “HIDE selected products completely …” Here’s where we are confused. If we enable this option, then the ‘SELECTED’ Product which we had chosen to be VISIBLE in Canada is now COMPLETELY HIDDEN (all 3 options refer to ‘selected products’)!

    Does enabling Option 2. “Make Non-Purchasable” mean that users in Canada can SEE the Product but now cannot purchase it??

    Is this how it works?
    1. Product that does not have any Country selected in the meta box on its edit page is VISIBLE EVERYWHERE.
    2. Product that does have a Country/Countries selected to be VISIBLE to is SUBJECT to the Visibility Options in the ‘Product Visibility by Country’ module (i.e. Options 1 – 3.) ; which does not make sense (as described above), OR
    3. Options 1 – 3 apply to only to users other than those in the selected Country/Countries – so these users cannot see the ‘selected products’ in shop and searches (Option 1), cannot add to cart (Option 2) and/or cannot see them anywhere on the site (Option 3); which again does not make sense since the whole idea of selecting a Country in the meta box is so that these users cannot see the selected Products in the first place!

    Help appreciated.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  6. #comment>

  7. Sam June 22, 2019 at 3:05 pm#comment>

    Hi, Is it also possible to select the countries in which products should not be visible.
    I sell worldwide, but don’t want to show a product in one country.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ June 25, 2019 at 5:18 pm#comment>

      Hi Sam,

      Yes, you can opt for using “invisible countries” along with or instead of “visible” countries. There’s also quick edit and bulk edit options.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  8. #comment>

  9. agazoom March 30, 2019 at 3:57 am#comment>

    Hi there,
    I’m using the Product Visiblity by Country and using the Booster -> Selector: Country widget.
    My issues is that this selector lists every country in the db. I would like it to only list the countries I sell to (United States/Canada).

    I’ve also tried using the simple [wjc_selector type=”country” countries=”US,CA”] shortcode but that doesn’t work at all.

    Any ideas?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ March 31, 2019 at 6:27 pm#comment>

      Hi,

      Could you contact us directly at [email protected]? Thank you.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    • Giacomo Di Fuccia October 14, 2019 at 9:37 am#comment>

      Is there a solution to only display in the widget certain countries? I’ve tried a lot of different solutions but nothing.

      Thanks for the support.

      #comment>#comment>Avatar#comment>

    • #comment>

    • RokasJ October 14, 2019 at 2:25 pm#comment>

      Hi,

      I have just replied to your email but in case someone else needs this, you can use ‘countries’ argument in shortcode.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  10. #comment>

  11. pimpiet March 25, 2019 at 10:14 am#comment>

    Sometimes this function does not work. This can be for example if the user uses a VPN. If the user’s address is also looked into, this can no longer go wrong. Can you add that extra check?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ March 26, 2019 at 12:29 am#comment>

      Hi,

      This module allows setting country detection method – by IP or user selection. If it’s selected by IP then it detects location from given IP, this includes cases when customers use VPNs to access your website from a remote server, in which case an IP of the VPN server will be detected. Unfortunately it’s not possible to figure out the real IP in these cases.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  12. #comment>

  13. Beh July 18, 2018 at 1:33 am#comment>

    Hello, i emailed you guys at least 4 times since a month ago but never heard back from you.

    I have set my store to free shipping for purchases above 25usd and my store sells in multiple currencies. When checking out, shipping is set to free whenever it sees the number 25, regardless if it is 25yen or sterling or whatever. I have contacted my shipping plugin. They did an investigation and found out that it is booster that is causing the problem because it doesnt convert the base currency back to usd.

    Could you please reply my email or at least look into this asap and have it fixed or let me know what i might have missed here? Thanks

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  14. #comment>

  15. Ben July 15, 2018 at 6:59 pm#comment>

    Hello,

    Does hide woocommerce plugin by country allow me to hide a variation by country but leave the other variations visible and purchasable?

    Thanks,
    Ben

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ July 15, 2018 at 7:55 pm#comment>

      Hi Ben,

      Unfortunately this is not yet possible but we have added it to our todo list.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    • Arian February 21, 2019 at 3:16 pm#comment>

      Hi,

      Now it is half a year later, by any chance have you included this function to use it not only for products, but also for product variation?

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  16. #comment>

  17. Lorenzo April 3, 2018 at 1:47 pm#comment>

    I’m trying to use this Plugin to hide some products of our web store to certain countries were we cannot sale because of commercial agreements, but , at first look, seems that, after applied the restrictions, the product aren’t reacheable from the menus, but are normally explored if found by Google search or by a simply internal site search.
    Is it normally? If yes, is it possible to consider to block the access also in that cases, with a message or a dedicated message page?
    Is it possible to create an option to hide only the price for the selected countries?

    Thanks in advance for your answer.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • danielc April 12, 2018 at 10:52 pm#comment>

      Hi Lorenzo,

      you can hide prices for selected countries.

      To do this you have to buy Booster Plus if you don’t have yet, this will let you create more than 1 group in Prices and Currencies by Country > Country Groups (WooCommerce > Settings > Booster > Prices & Currencies > Prices and Currencies by Country), here you can create 2 groups in Country Groups below, then in first group you select USA and Canada (or write by comma US, CA depends on what you choose in Countries Selection) and make the Currency to Dollars ($) for example.
      In the 2 group you select all countries you don’t need at all (you can do that easily, if you select in Countries Selection: Multiselect then just CTRL+A to select all countries and deselect with CTRL the USA and CA) except the USA and CA and scroll below to Exchange Rates, you will see there your 2 groups and check box for 2 group Make price empty.

      So now your website will show prices for the USA and CA and for all others countries the prices will be empty. If you want to change the empty prices to something else like Call for price (for example) then you can go to WooCommerce > Settings > Booster > Button & Price Labels > Call for Price and enable the Call for price module, this will make all your empty prices to your text.

      The USA and CA I used to like an example, so you do your own countries which you need.

      Hope I made it a little more clear, please let me know if you have any more questions or need any help.

      Best regards,
      Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    • Lorenzo April 16, 2018 at 3:32 pm#comment>

      Hi Daniel,

      Your suggestion applies for All products in the shops at once, but I need to hide the price of some specific products on specific countries. This is the reason because I choosen to use this plugin instead of “Prices and Currencies by Country”.

      Thank you for your answers
      Sincerely

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  18. #comment>

  19. Lorenzo March 29, 2018 at 1:15 pm#comment>

    Hi,
    It seems that the country inclusion/esclusion is separated for each site language.
    We are using a double language site managed with WPML and I have to make the country setting 2 times: one for English product post and one for Italian product post.
    Am I wrong?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Booster Support Team March 29, 2018 at 10:28 pm#comment>

      Hi Lorenzo,

      Yes, I think you are correct. As far as I know English and Italian product versions are basically considered different products (with different IDs), so you have to set country visibility for both product versions.

      Hope that helps.

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    #comment>

  20. #comment>

  21. priyank1993 March 17, 2018 at 7:31 pm#comment>

    Need Help in Using Product Visibility Bu Country & Prices/Currency b Country Widget & Module,

    My Requirements:-
    If the user selects a country from the Selector Widget, the product from that country should be displayed in that country’ respective currency.

    For doing so, now I to Include Two Widgets,
    1. Product Restriction
    2. Multi-Currency Switcher

    Is it possible with a single widget only ?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  22. #comment>

  23. Karen C January 22, 2018 at 8:05 am#comment>

    Hi there! Love this plugin. Our shop has this situation where products availability is based on shipping country. so say I add product A to cart in China where it is available, it will not ship to US. Product A is not visible in US but in the particular situation I outlined customer is still able to add to cart and check out (ship product A to US when shopping from China).

    Is it suppose to happen and is there a workaround?

    Thanks!

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  24. #comment>

  25. Jorge Diaz December 1, 2017 at 6:37 pm#comment>

    I’m interested in buying the plugin to enable pro features, but I have a question, Is there a way (or plans to add it) to implement this filter on a per state basis? i.e.: I want to sell in Mexico, but some products will be available only for some states, I want to hide them from users buying from a state different from the ones allowed. I understand that users can select the country they’re in, so the selector must show states instead of countries too.
    Thank you in advance.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Jorge Diaz December 18, 2017 at 8:18 pm#comment>

      Hi, just checking if anyone has found a way to do what I need regarding the message above. If I need to manipulate php, I can do that, just don’t know which files or functions to include states instead of countries.

      #comment>#comment>Avatar#comment>

    • #comment>

    • Booster Support Team December 19, 2017 at 4:26 pm#comment>

      Hi Jorge,

      Sorry for the delay. I’ve checked the WooCommerce code and I’m not really sure that I can detect state by IP. However I’m thinking about adding new module (something like “Product Visibility by Custom Param”), so you could set “custom param” as “state”, then fill states manually. However it would work only in manual mode, meaning that your customers will have to select their state from e.g. drop down box (i.e. no detection by IP). Would that be good enough?

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    • Jorge Diaz December 20, 2017 at 10:22 pm#comment>

      Hi, thank you for the reply Tom. Actually that would be enough for the purpose of what I want to accomplish. In fact it’s the way I want to work it, the customer chooses the state he/she is in. I’ll have to figure out how to deal with customers choosing a different state from the one they’re actually in.

      Hope to hear news from the new module in the near future.

      Have an excellent day.

      #comment>#comment>Avatar#comment>

    • #comment>

    • Booster Support Team December 21, 2017 at 10:26 pm#comment>

      Hi Jorge,

      Ok. As requested – I’ve just added new “Product Custom Visibility” module (in “WooCommerce > Settings > Booster > Products > Product Custom Visibility”). Please download the development version here – https://booster.io/dev/. Please let me know if it’s working as expected, or you have any questions, or need any help.

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    #comment>

  26. #comment>

  27. Amelie October 16, 2017 at 7:42 pm#comment>

    Hello,

    When using the Product Visibility by Country Module, we can, easily hide certain products but when we apply any filter (ex: low to high) or sort by category
    all products are displayed.

    Any idea?
    Many thanks

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  28. #comment>

  29. Alain Aubry September 11, 2017 at 6:45 pm#comment>

    Congratulations, many changes in new version!
    Still in this area of ‘Country Visibility’ you can do something.
    You display the whole world country list, if I have already defined in WC setup a list of countries where I sell, it would be nicer to use this smaller list instead.
    Also would be nice to have ‘include’ and ‘exclude’ options from that shorter list.
    Thanks
    Alain

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Booster Support Team September 15, 2017 at 12:11 pm#comment>

      Hi Alain,

      Thank you for the feedback. I’ve just implemented both your suggestions in our development version (please let me know if you wish to test it out).

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    • Alain Aubry September 15, 2017 at 12:59 pm#comment>

      Oh yes!
      I ‘ll test it right now, send me the link!

      #comment>#comment>Avatar#comment>

    • #comment>

    • Booster Support Team September 15, 2017 at 1:16 pm#comment>

      I’ve just sent you the link.

      When you install new version, please visit module’s settings. In “Admin Options” section, there are two new options: “Visibility Method” and “Country List”. Please let me know if it’s working as expected.

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    • Alain September 15, 2017 at 7:24 pm#comment>

      I was unable to test.
      The new file you sent collapsed the ‘plus’ installation, now it only works in one install,
      I have two. One for production and another one (in a subdomain) for testing. I even have a localhost install. The new setup does not allow for this.
      I went back to: Booster for WooCommerce 3.1.0 and Booster Plus for WooCommerce 1.1.0

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  30. #comment>

  31. Alex September 6, 2017 at 6:06 pm#comment>

    Location “European Union” doesn’t work. Or it doesn’t recognise Sweden to be a part of EU 🙂

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Booster Support Team September 7, 2017 at 5:11 pm#comment>

      Hi Alex,

      Thanks for reporting – yes, you are correct, this is a bug we’ve missed – EU is not really working in this module, so for now you have to select all EU countries manually. We will fix that in next update.

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    • Booster Support Team September 8, 2017 at 4:19 pm#comment>

      UPDATE: Today I’ve fixed it in our development version – EU selection should now work correctly, including Sweden 🙂 If you wish to check it out – the development version is here – https://booster.io/dev/. You will need to uninstall the old plugin version first (don’t worry your saved settings won’t disappear).

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    #comment>

  32. #comment>

  33. Alain Aubry August 28, 2017 at 8:30 am#comment>

    This is working in reverse.
    The product metabox says ‘Visible in Countries’, but I have to select ALL countries and DESELECT the ones I want to sell the product.
    Is this the way it is supposed to work? This is reverse of what is explained here.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Booster Support Team August 30, 2017 at 12:52 pm#comment>

      Hi again,

      I’ve just rechecked and I don’t think you are correct. As described – you have to select countries in which product will be visible. The only exception – if no countries are selected at all, product is visible everywhere. However if you select at least one country – product will be visible in that country only (and invisible in all remaining (i.e. not selected) countries). Please let me know if you still getting opposite results.

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    • Alain Aubry August 31, 2017 at 4:31 pm#comment>

      Hi Tom
      Anyway, I was kind of in a hurry.
      I needed to remove some products from some countries.
      I ended up using another plugin that gave a more simpler interface, worth having a look: https://wordpress.org/plugins/product-country-restrictions/
      At a later date I will try again.
      Thanks
      Alain

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  34. #comment>

  35. Alain Aubry August 27, 2017 at 3:24 pm#comment>

    How can I select a group of product or a category and apply ‘visibilty’ to ALL of them at once?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Booster Support Team August 30, 2017 at 12:47 pm#comment>

      Hi, Alain,

      Unfortunately at the moment the only way is to set countries for each product individually. However this seems like quite useful feature, so I’ll try to add it in next update.

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    #comment>

  36. #comment>

#comment>#comment>#comment>#comment>

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

This site uses Akismet to reduce spam. Learn how your comment data is processed.