0

I have a number of redundant Tax rates (539 when I only need 269) in Magento 2.2.7 and I'd like to remove them.

Is there a way to do this that doesn't involve going into each one and clicking the "Delete Rate"?

1

You will need to operate some database query.

I'm not sure what happens with old orders, and what you wanna do with that.

but can you can delete the records in this tables, and see if that fix your problem.

tax_calculation     
tax_calculation_rate
tax_calculation_rate_title
tax_calculation_rule
tax_class

Note: Please export the database table before this process implement.

  • 1
    Hi. Thanks, logged in via phpmyadmin and it looks like I just had to empty the tax_calculation_rate table and then re-import them via CSV. Just for good measure I also deleted the Tax rules and recreated them in Admin. It doesn't seem to have affected the old orders in any way. – CJNotts Feb 1 '19 at 12:19
1

Here is what I used:

  1. Basically you need ti get to your table to check the columns - use SELECT * FROM tax_calculation_rate;

2 .Get the tax_region_id, in my case it was 34.

3 .Then use this MYSQL command to delete all the rates with this tax_region_id:

mysql> DELETE FROM tax_calculation_rate WHERE tax_region_id = "34";

Query OK, 1029 rows affected (0.07 sec)

Hope this helps someone =)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.