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

Skip tax calculation on $0 renewal orders and API created orders #174

Closed devinsays closed 3 years ago

devinsays commented 3 years ago

Resolves #173. This update skips tax calculation for subscription renewal orders that total 0, which can be common for gift subscription orders which have a signup fee but no recurring cost.

It also adds two filters for taxjar_renewal_order_should_calculate_tax and taxjar_order_should_calculate_tax for the event that some stores may want to skip tax calculation for other types of orders.

Steps to Reproduce

Currrently whem a $0 renewal order is generated, an API call is made to TaxJar.

[Still working on unit tests for filters and to verify API call is not made.]

Expected Result

When a $0 renewal order is generated, no API call is made to TaxJar.

Click-Test Versions

Specs Passing

dallendalton commented 3 years ago

@devinsays - We have decided to take a slightly different approach then in this PR. We are currently in the midst of refactoring a lot of our calculation code so the approach we are taking lines up more with where we intend to go. Here is the PR contain our new fix. It will probably be officially released next week.

Thanks!

devinsays commented 3 years ago

@dallendalton Awesome! Thanks for working on this (and glad I avoided spending time working out the unit tests).

Added some minor feedback here: https://github.com/taxjar/taxjar-woocommerce-plugin/pull/175#pullrequestreview-574585090