taxjar / taxjar-woocommerce-plugin

WooCommerce Sales Tax Plugin by TaxJar
http://www.taxjar.com/woocommerce-sales-tax-plugin/
GNU General Public License v2.0
30 stars 29 forks source link

Subscription renewal doubles line item tax #178

Closed pogla closed 3 years ago

pogla commented 3 years ago

Steps to reproduce

  1. Update the plugins to the latest versions. It also doesn't work with older versions.
Screenshot 2021-02-11 at 17 57 17
  1. Create a subscription. Use a delivery address that pulls tax rate via the TaxJar API. We are using a tax class on the product but I don't think it matters.
  2. Process renewal
Screenshot 2021-02-11 at 18 00 45
  1. Line item gets double taxes applied.
Screenshot 2021-02-11 at 18 01 30
  1. If you press Recalculate, it gets recalculated properly.

I traced down the issue to this loop. So the loop will add a tax line item for each existing line item. Even if the tax item already exists.

dallendalton commented 3 years ago

This is resolved with the fix in #179