=== WooCommerce Product Country Restrictions - Different Shop Catalog per Country ===
Contributors: vegacorp,josevega, freemius
Tags: woocommerce, country restrictions, geolocalization
Tested up to: 5.1
Stable tag: 1.2.1
Requires at least: 3.6
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Restrict or hide WooCommerce products by country, create different product catalog for different countries

== Description ==
This plugin is the perfect tool for geolocalizing your WooCommerce store, and personalizing the products for the user country.

Are you creating a WooCommerce store and you want to restrict products to specific countries?

This plugin lets you sell WooCommerce products to specific countries.

When you create or edit products, you will have the option to sell the product to a list of countries, or not sell the product to a list of countries.

One important feature is that products are completely hidden from the blacklisted country. They are removed from the product catalog, product category, product search, etc. The people from that country can´t see the product at all.

You can use this for a lot of purposes.

= Use cases =

* Create different shop catalogs for different countries

* Sell different product categories for each country

* Sell WooCommerce products with higher prices for the United States, and lower prices for India

* Offer products with different Attributes, Variations, Pictures, and Prices to different Countries

* Change product descriptions and titles based on the country of the user

* Apply the country restrictions to every product

* This works with Simple Products, Grouped Products, and External Products

* In the free version there´s no global settings, you need to edit every product manually

* And more...

= Premium features =

[Try Premium Plugin for FREE for 7 Days](https://wpsuperadmins.com/go/wc-country-restrictions-trial-wporg?trial=true&utm_source=wp.org-readme)

**Advanced geolocation options:**
Auto detect country by IP
Show country selector in the header and let users view the country catalogs
Use the shipping country
Use the billing country

**Advanced restriction options:**
Hide products from the shop catalog, category page, search, and product page
Show products and disable "add to cart"
Show products and disable "add to cart" and hide prices

**All product types supported**
Example. Variable Products = Restrict variable products and individual variations by country.

**Hide individual Product Variations by Country**
Offer a "large size" to Spain, "Small size" to Germany
Offer a "physical product" to your home country, and "digital (downloadable)" option to the other countries
Offer a print / delivery to your home country, and digital only to other countries
Show different variation pictures and product dimensions for different countries

[Try Premium Plugin for FREE for 7 Days](https://wpsuperadmins.com/go/wc-country-restrictions-trial-wporg?trial=true&utm_source=wp.org-readme)

**Hide product categories by Country**
You have a menu with the categories: Music, Movies, and Apps.
You can hide the "Music" catalog for Canada, and show the "Movies" catalog for USA.
This will automatically remove the category from the menus, categories list, product pages, etc.
You can select if you want to hide the category catalog only or hide category and all products under the category.

**Bulk Edit Products by Category**
You can hide all products under the category "Music" for Canada, and show all products under category "Videos" for USA only.

**Global settings page**
You can apply country restrictions to all products automatically. No need to edit every product manually.

You can hide all products for specific countries, or sell products to specific countries.

You can also hide all variations by attributes for specific countries. For example, make all "size large" available to USA only, this applies to all products at once.

[Try Premium Plugin for FREE for 7 Days](https://wpsuperadmins.com/go/wc-country-restrictions-trial-wporg?trial=true&utm_source=wp.org-readme)

== Installation ==
= Automatic installation =

Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.

In the search field type the plugin name and click Search Plugins. Once you’ve found our plugin you can install it by simply clicking “Install Now”.

= Manual installation =
The manual installation method involves downloading our plugin and uploading it to your webserver via your favourite FTP application. The WordPress codex contains [instructions on how to do this here.](https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation)


== Frequently Asked Questions ==

= What type of products can I use this plugin on? =

The free version works with simple, grouped, external products.

The [premium version](https://wpsuperadmins.com/go/wc-country-restrictions-trial-wporg?trial=true&utm_source=wp.org-readme) works with all product types.

== Screenshots ==
1. Settings in the product editor

== Changelog ==

= 1.2.1 - 2019-02-26 =
* CHANGE - Added a link to global settings on the product metabox to improve UI
* CHANGE - Updated freemius SDK to v2.2.4
* CHANGE - Clear WooCommerce's cache when a post's country restrictions are updated
* FIX - Country restrictions per category - It doesn't update all the products
* FIX - Products weren't excluded on the frontend if the products list used post__in
* FIX - Sometimes the country selector doesn't look like a dropdown when themes use a different html structure for dropdown menus
* FIX - Country restrictions per category - When a product is created/updated, apply the country restrictions from the assigned category
* FIX - Country restrictions per category - When we remove a category from a product, if the category had restrictions, remove the restrictions from the product

= 1.2.0 - 2019-02-17 =
* NEW - Added geolocation option: Use the shipping country (premium)
* NEW - Added geolocation option: Use the billing country (premium)
* NEW - Added geolocation option: Display a country selector in the header so the user can switch between country catalogs (premium)
* NEW - Added restriction option: Allow to show products and disable "add to cart" (premium)
* NEW - Added restriction option: Allow to show products and disable "add to cart" and hide prices (premium)
* CHANGE - Category - Separate section with <hr>, it doesn't standout between custom fields added by other plugins (premium)
* FIX - Categories - Allow to save country field empty and reset product meta (depending on the "apply to" field) 
* FIX - Products - Allow to clear the country field to reset restrictions

= 1.1.2 - 2019-02-12 =
* CHANGE - Replace our geolocation library with WC's built-in geolocation class
* CHANGE - Add country as body class, so we can hide elements by country with css
* CHANGE - Add non-persistent cache for the disallowed products list to improve performance
* FIX - Exclude common bots from geolocation by user agent.
* FIX - Improve the product filtering logic. Sometimes hidden products appeared on some themes' lists

= 1.1.1 - 2018-12-29 =
* FIX - when product metabox is saved initially, the country restriction doesnt work
* CHANGE - Improved instructions on welcome page and global settings

= 1.1.0 - 2018-09-19 =
* Added option to restrict individual product categories by country
* Added option to bulk edit products by category

= 1.0.1 - 2018-09-19 =
* Save countries as string separated by commas instead of serialized array

= 1.0.0 - 2018-09-09 =
* Initial release