Use WooCommerce Geolocation Plugins to Create Country-Specific Product Tables

Published on: Updated: January 16, 2019

WooCommerce geolocation plugin

We’re pleased to announce that our WooCommerce Product Table plugin works several free WooCommerce geolocation plugins. You can use these to show different content in your product tables depending on the customer’s country.

Different geolocation plugins add different features, so here’s a summary of the ones we’ve tested and how they work with WooCommerce Product Table:

  • WooCommerce Product Country Restrictions. This simple geolocation plugin disables the add to cart button for users in selected countries. Use it to replace the add to cart button with a ‘Read more’ button linking to the single product page for countries you don’t sell to. The add to cart and read more buttons appear correctly in WooCommerce Product Table.
  • WooCommerce Product Table Plugin Compatibility LogoGeoTargeting Lite – WordPress Geolocation. Shows or hides completely different product tables depending on the customer’s country. Each product table can show products from a different category or tag. Use this plugin to show different products to different countries, listed in an interactive product table layout. GeoTargetingWP has joined the official WooCommerce Product Table compatibility scheme.

Get WooCommerce Product Table

Test out the country-specific WooCommerce tables on our compatibility demo page.

How to use WooCommerce Product Country Restrictions with WooCommerce Product Table

WooCommerce country specific products plugin

  1. Install WooCommerce Product Table and WooCommerce Product Country Restrictions.
  2. Go to WooCommerce > Settings > Products > Product Table, activate your WooCommerce Product Table license key, and configure the plugin settings to choose your product table columns, filters etc.
  3. Go to the Add/Edit Product screen.
  4. Scroll down to the Product Data section and choose the countries that you wish to show/hide the product for.
  5. Repeat the process for your other country-specific products.
  6. Finally, create product tables by adding the shortcode [product_table] to any page. If your WooCommerce product tables include an add to cart column, then the button will change to a ‘read more’ button for customers in countries that the product is not available in. If the product tables include a link to the single product page, then the read more button will appear on the single cart page.

How to use GeoTargeting Lite with WooCommerce Product Table

Next, I’ll tell you how to create different product tables which appear depending on the user’s country.

How the WooCommerce geolocation plugin works

The free WooCommerce geolocation plugin comes with 2 shortcodes:

  • [geot country="US"] USA only content [/geot]
  • [geot exclude_country="US"] Everyone except USA will see this [/geot]

You can use these to show or hide specific content anywhere on your website depending on the user’s country. The geolocation plugin looks at their IP address to decide which country they’re in.

You need to know the correct 2-letter alpha country code for the geolocation to work.

How to create country-specific WooCommerce product tables

Use the WooCommere geolocation shortcodes to create country-specific product tables. I’m assuming that you have already set up WooCommerce and added your products.

  1. Install WooCommerce Product Table and GeoTargeting Lite – WordPress Geolocation.
  2. Go to WooCommerce > Settings > Products > Product Table, activate your WooCommerce Product Table license key, and configure the plugin settings to choose your product table columns, filters etc.
  3. Next, you need to label your products based on the countries they should be visible to. You can use categories or tags for this. Or if you’re already using categories and tags for something else, then create a WooCommerce taxonomy and use this instead. If you want a single product to appear for multiple countries, then it’s ok to put them in more than one category/tag/taxonomy.
  4. Create a new page where you will be adding the country-specific product tables.
  5. Next, you need to use the geolocation shortcodes to create product tables that are only visible depending on the user’s country. Put the [product_table] shortcode inside the geolocation shortcodes. This will show or hide a product table to the correct country only, depending on which shortcode you’re using.
  6. Add as many WooCommerce geolocation shortcodes to the page, each showing or hiding product tables from one or more countries. Use the examples below as guidance on how to do this.

Tip: If you want a specific product table to be visible or hidden from more than one country, then you can add multiple country codes within a single shortcode, Just separate them with commas.

Geolocation example 1

The following combination of shortcodes will create a page containing 2 product tables: 1 showing products from a category called ‘france-germany’ to customers in France and Germany only, and 1 showing products from the ‘UK’ category to customers in the UK only:

[geot country="FR,DE"][product_table category="france-germany"] [/geot]

[geot country="US"] [product_table category="us"] [/geot]

As you can see, I have added two product tables to the page. However, each customer will only ever see one product table depending on their location.

Geolocation example 2

This time, we’ll use the exclude option to create a product table that will not appear for customers in the US. This assumes that you have tagged these products ‘US’:

[geot exclude_country="US"] [product_table tag="us"] [/geot]

Geolocation example 3

In this final example, we’ll use the include and exclude options together. This will create a product table that is visible to all countries except for Australia. It assumes that I have created a category called ‘Australia’ for the Australia-only products. It’s a useful method if sell different products to a specific country in WooCommerce, e.g. for legal reasons.

[geot country="AU"] [product_table category="australia"] [/geot]

[geot exclude_country="AU"] [product_table exclude_category="australia"] [/geot]

All customers will see 1 product table on the page. Customers in Australia will see the products from the Australia category, and everyone else will see all your other products.

How to show and hide the country-specific products elsewhere on your site

The above instructions will only show or hide the products in your WooCommerce product tables.

You will need to use the geolocation plugin’s other features to restrict the visibility of products elsewhere in your store, for example on the main shop pages, widgets and single product pages. To help with this, you can use the above shortcodes anywhere on your site and in template files.

If you want to restrict access to any of the default WooCommerce pages and direct people to your geolocation product table page, then the free Redirection plugin is perfect for this. Simply add a redirect from any unwanted pages such as the main Shop page, and users will be taken to your product tables page instead.

Do any other geolocation plugins work with WooCommerce Product Table?

Right now, these are the only WooCommerce geolocation plugins that we know work correctly in the product table view. There are some geolocation plugins that definitely don’t work with it, and we have included these on our list of incompatible plugins.

There are other geolocation plugins that we haven’t tested with. Please let us know if you discover any more that work with WooCommerce Product Table, and we’d be happy to include them on this page.

Where to get the WooCommerce geolocation plugins

You can get WooCommerce Product Table from our website. GeoTargeting Lite – WordPress Geolocation is available free from

Get WooCommerce Product Table

Filed under: WooCommerce Product Table, WordPress Plugins ,