Skip to content

Commit

Permalink
Fix dynamic tax code issues (#206)
Browse files Browse the repository at this point in the history
* Fix issue where dynamic rate was being used on shipping when save rates was enabled.

* Version 4.0.1
  • Loading branch information
dallendalton authored Nov 22, 2021
1 parent e89b847 commit 395f58e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 4.0.1 (2021-11-19)
* Change dynamic tax rate ID to 999999999 to help prevent issues with 3rd parties ingesting exported WooCommerce order data
* Fix issue where shipping was still utilizing dynamic tax rate when the save rates setting was enabled.

# 4.0.0 (2021-11-11)
* Refactor cart tax calculation to stop calculation events from triggering twice
* Fix issue with tax calculation on dynamically created products and variations
Expand Down
4 changes: 2 additions & 2 deletions includes/TaxCalculation/class-tax-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
class Tax_Builder {

const TAX_RATE_ID = 999999999999999;
const TAX_RATE_ID = 999999999;

/**
* Determines whether to create a WooCommerce tax rate during tax calculation.
Expand Down Expand Up @@ -185,7 +185,7 @@ public function build_shipping_tax( $applied_rate, $taxable_amount ) {
$woo_rate = $this->create_woocommerce_rate( $applied_rate * 100 );
$wc_rate = $this->build_woocommerce_rate( $applied_rate * 100, $woo_rate['id'] );
} else {
$wc_rate = $this->build_woocommerce_rate( $applied_rate * 100 );
$wc_rate = [];
}
} else {
$wc_rate = $this->build_woocommerce_rate( $applied_rate * 100 );
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: taxjar, tonkapark, fastdivision
Tags: woocommerce, taxjar, tax, taxes, sales tax, tax calculation, sales tax compliance, sales tax filing
Requires at least: 5.4
Tested up to: 5.8.2
Stable tag: 4.0.0
Stable tag: 4.0.1
License: GPLv2 or later
URI: http://www.gnu.org/licenses/gpl-2.0.html
WC requires at least: 5.4.0
Expand Down Expand Up @@ -95,6 +95,10 @@ Our plans come with filings included, with additional filings available for purc

== Changelog ==

= 4.0.1 (2021-11-19)
* Change dynamic tax rate ID to 999999999 to help prevent issues with 3rd parties ingesting exported WooCommerce order data
* Fix issue where shipping was still utilizing dynamic tax rate when the save rates setting was enabled.

= 4.0.0 (2021-11-11)
* Refactor cart tax calculation to stop calculation events from triggering twice
* Fix issue with tax calculation on dynamically created products and variations
Expand Down
4 changes: 2 additions & 2 deletions taxjar-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: TaxJar - Sales Tax Automation for WooCommerce
* Plugin URI: https://www.taxjar.com/woocommerce-sales-tax-plugin/
* Description: Save hours every month by putting your sales tax on autopilot. Automated, multi-state sales tax calculation, collection, and filing.
* Version: 4.0.0
* Version: 4.0.1
* Author: TaxJar
* Author URI: https://www.taxjar.com
* WC requires at least: 5.4.0
Expand Down Expand Up @@ -43,7 +43,7 @@
*/
final class WC_Taxjar {

static $version = '4.0.0';
static $version = '4.0.1';
public static $minimum_woocommerce_version = '5.4.0';

/**
Expand Down

0 comments on commit 395f58e

Please sign in to comment.