Back to blog
8 min read Content Sync

Sync WooCommerce Tax Rates Between Two Stores (All Tax Classes)

A roastery in Germany sells coffee beans to customers in Austria, France and the Netherlands. Beans count as food, so they go into the Reduced rate class: 7% in Germany, 10% in Austria, 5.5% in France, 9% in the Netherlands. The live store still had the Dutch rate at 6% from years ago and no rows for Austria and France at all. The correct table had already been entered on the staging site. We moved it to the live store with one button; for stores that are not connected, a CSV file does the same job.

PRO: tax rates are part of the PRO plugin. Tested with Import Export by RockStarLab 2.2.46 and PRO 2.1.42, WooCommerce 11.2.1, WordPress 7.1.5.

Short Answer

Connect the two stores in Content Sync. On the source store, open WooCommerce > Settings > Tax, pick a tax class, click Sync Tax Rates and then Push to Site. Rates with the same country, state, postcodes, cities, priority and name are updated on the other store, the rest are created. Tick Also copy the tax options to bring the settings of the Tax page along. Repeat for each class. Without a connection, export WooCommerce Tax Rates to CSV and import the file on the other store.

Why the WooCommerce CSV Buttons Are Not Enough

Every tax class table in WooCommerce has Export CSV and Import CSV. They work for a first copy into an empty store. For a store that already has rates they cause trouble:

  • The export covers one class at a time. A store with Standard, Reduced rate and Zero rate needs three files.
  • The WooCommerce importer adds every row as a new rate. We checked its code: it inserts each line and never looks for an existing rate. Import a file twice and every country is in the table twice.
  • A row with a class slug that the store does not have is saved with that slug anyway. The class does not appear under the Tax tab, and those rates are hard to find again.

The PRO plugin matches rates instead of adding them, writes all classes into one file and creates a missing class before it saves rates into it.

Step 1: Connect the Stores

Sync Tax Rates uses the Content Sync connection between two sites. If you already push products or pages from staging to live, the connection is there. If not, How Content Sync Works explains the API key and the push and pull directions. The button appears only when the store has at least one active connection, and it pushes only over a connection that allows push (pull needs a connection that allows pull).

Step 2: Push One Tax Class

On the staging store, open WooCommerce > Settings > Tax and click Reduced rate rates. Save any change you made to the table first. The plugin sends what is stored in the database, and it refuses to start while the table has unsaved edits.

WooCommerce Reduced rate rates on the staging store: AT 10, DE 7, FR 5.5 and NL 9 with the Sync Tax Rates button next to Insert row and Remove selected row(s)
The staging store has the correct Reduced rate table.

Click Sync Tax Rates, choose the live store in the Site list and click Push to Site. Our push reported 2 created and 2 updated: Austria and France were new on the live store, Germany kept its 7% and the Netherlands changed from 6% to 9%.

We also ticked Also copy the tax options. Staging enters prices with tax included, and the live store still had them without tax; after the push the live store had Yes, I will enter prices inclusive of tax too. The box copies everything on the Tax options page: prices entered with or without tax, which address taxes are based on, the shipping tax class, rounding, how prices are shown in the shop and the cart, the price suffix and how tax totals are shown. A shipping tax class the live store does not have is created.

Sync Reduced rate tax rates dialog: site QA aie6, delete option unticked, Also copy the tax options ticked, result Done: 2 created, 2 updated, 0 deleted. Tax options copied.
Two rates created, two updated, tax options copied.

Then open Standard rates and do the same. The live store had Germany and Austria there, so the Standard push updated those two and created France and the Netherlands.

Pull from Site works the other way: it reads the class from the connected store and writes it into the store you are on. The page reloads when you close the dialog, so the table shows the new rows.

Step 3: Check the Live Store

Reduced rate rates on the live store after the push:

Reduced rate rates on the live store after the push: AT 10, DE 7, FR 5.5 and NL 9
The live store after the push.

Each rate has its own ID on each store, and the same number on two stores usually means two different rates. That is why the match uses the location and the name, not the ID.

How Rates Are Matched

Part of the rate Used to find the rate Copied from the source
Tax class yes yes (created if missing)
Country code, State code yes yes
Postcode / ZIP, City yes, as a list, in any order yes
Priority yes yes
Tax name yes, case is ignored yes
Rate % no yes
Compound, Shipping, order in the table no yes

Renaming a rate on one store therefore creates a second rate on the other. Rename it on both, or use the delete option below.

Delete Rates That Are Not on the Source

A normal push never deletes anything. If the live store has an extra rate for Switzerland that staging does not have, it is still there after the push. When the source table is the reference and both tables must end up the same, tick Also delete rates of this class on the receiving site that are not in the source before you push. We added a Swiss reduced rate on the live store and pushed Reduced rate again with the box ticked: 0 created, 4 updated, 1 deleted. The option only touches the class you are syncing.

Without a Connection: CSV File

For a store you cannot connect, for example a client store behind a firewall, use a file. On the source store open Import Export by RockStarLab > Export and choose WooCommerce Tax Rates:

Export screen, Step 1: Select Content Type, with the WooCommerce Tax Rates card selected
For a file, export WooCommerce Tax Rates.

The file has one row per rate for all classes:

tax_rate_id,tax_rate_class,tax_rate_class_name,tax_rate_country,tax_rate_state,tax_rate_postcodes,tax_rate_cities,tax_rate,tax_rate_name,tax_rate_priority,tax_rate_compound,tax_rate_shipping,tax_rate_order
21,reduced-rate,"Reduced rate",NL,,,,9.0000,"BTW laag",1,0,1,7

On the other store, import it as WooCommerce Tax Rates. The importer uses the same matching as the button, so running the same file twice changes nothing. An empty tax_rate_class means the Standard class. Postcodes and cities are separated by semicolons; WooCommerce ranges such as 90001...90099 and wildcards such as 101* are kept. A rate written as 8,875 % is read as 8.875. The country can be a two-letter code or a name: DE, Germany, United States (US) and UK are all read, and a state can be CA or California. A value that is not a country fails, and the message shows the value it got.

WP-CLI and AI Agents

Import Export by RockStarLab gives AI agents its exports, imports and Content Sync as abilities. Through the WordPress MCP Adapter, WordPress itself offers an agent only read-only abilities for site, user and environment information, so without the plugin the agent cannot do the steps above. With it, one request is enough:

wp rsl-ie export --type=tax-rate --format=csv --output=tax-rates.csv --user=admin
wp rsl-ie import tax-rates.csv --type=tax-rate --user=admin

A CLI import of a two-row file updated the German Standard rate to 19.5% and created an Italian Reduced rate in one run. An AI agent connected through the plugin’s abilities finds the type as woo_tax_rate in rsl-ie-pro/list-content-types and exports it with rsl-ie-pro/export-start; our test job exported all 5 rates of that store.

Tax Classes of the Products

Which tax class a product uses is a product field, so it travels with the products when you sync or import them with the same plugin, and lands on the rates you pushed here.

FAQ

Can I copy WooCommerce tax rates to another store?

Yes. With Import Export by RockStarLab PRO, push a tax class from WooCommerce > Settings > Tax with Sync Tax Rates, or export WooCommerce Tax Rates to CSV and import the file on the other store. The button can also copy the tax options.

Does importing tax rates twice create duplicates?

Not with the PRO importer or the Sync Tax Rates button. A rate with the same class, country, state, postcodes, cities, priority and name is updated. The WooCommerce Import CSV button adds every row again.

Are tax classes created on the other store?

Yes. A missing class such as Reduced rate is created before its rates are saved.

Can the sync delete old rates on the live store?

Only when you tick the delete option. It removes rates of the synced class that are not in the source, so both tables end up the same.

Get the free plugin on WordPress.org. Tax rates are part of PRO.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

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

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE