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 3.3.5 and WordPress 4.9.5
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply

Comments

26 Comments

  1. Alain Aubry August 27, 2017 at 3:24 pm #

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

    Reply to thread

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

      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

      Booster Support Team
  2. Alain Aubry August 28, 2017 at 8:30 am #

    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

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

      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

      Booster Support Team
    • Alain Aubry August 31, 2017 at 4:31 pm #

      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

  3. Alex September 6, 2017 at 6:06 pm #

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

    Reply to thread

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

      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

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

      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

      Booster Support Team
  4. Alain Aubry September 11, 2017 at 6:45 pm #

    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

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

      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

      Booster Support Team
    • Alain Aubry September 15, 2017 at 12:59 pm #

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

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

      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.

      Booster Support Team
    • Alain September 15, 2017 at 7:24 pm #

      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

  5. Amelie October 16, 2017 at 7:42 pm #

    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

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

    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

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

      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.

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

      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

      Booster Support Team
    • Jorge Diaz December 20, 2017 at 10:22 pm #

      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.

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

      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

      Booster Support Team
  7. Karen C January 22, 2018 at 8:05 am #

    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

  8. priyank1993 March 17, 2018 at 7:31 pm #

    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

  9. Lorenzo March 29, 2018 at 1:15 pm #

    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

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

      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

      Booster Support Team
  10. Lorenzo April 3, 2018 at 1:47 pm #

    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

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

      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

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

      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